Skip to content

Fix @var tags syntax in docs #20391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions docs/guide-es/structure-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ título de la página y el formulario mismo, mientras que el código HTML organi
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model app\models\LoginForm */
/**
* @var \yii\web\View $this
* @var \yii\widgets\ActiveForm $form
* @var \app\models\LoginForm $model
*/

$this->title = 'Login';
?>
Expand Down Expand Up @@ -324,8 +326,10 @@ bastante el código del layout. En la práctica, probablemente le agregues más
<?php
use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $content string */
/**
* @var \yii\web\View $this
* @var string $content
*/
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
Expand Down
14 changes: 9 additions & 5 deletions docs/guide-es/tutorial-mailing.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ use yii\helpers\Html;
use yii\helpers\Url;


/* @var $this \yii\web\View instancia del componente view */
/* @var $message \yii\mail\BaseMessage instancia del mensaje de correo recién creado */
/**
* @var \yii\web\View $this instancia del componente view
* @var \yii\mail\BaseMessage $message instancia del mensaje de correo recién creado
*/

?>
<h2>Este mensaje te permite visitar nuestro sitio con un sólo click</h2>
Expand Down Expand Up @@ -140,9 +142,11 @@ El layout puede utilizar estilos CSS u otros contenidos compartidos:
<?php
use yii\helpers\Html;

/* @var $this \yii\web\View instancia del componente view */
/* @var $message \yii\mail\MessageInterface el mensaje siendo compuesto */
/* @var $content string el resultado de la renderización de la vista principal */
/**
* @var \yii\web\View $this instancia del componente view
* @var \yii\mail\MessageInterface $message el mensaje siendo compuesto
* @var string $content el resultado de la renderización de la vista principal
*/
?>
<?php $this->beginPage() ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Expand Down
8 changes: 5 additions & 3 deletions docs/guide-fr/input-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ Vous pouvez utiliser la méthode [dropDownList()](https://www.yiiframework.com/d
```php
use app\models\ProductCategory;

/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model app\models\Product */
/**
* @var \yii\web\View $this
* @var \yii\widgets\ActiveForm $form
* @var \app\models\Product $model
*/

echo $form->field($model, 'product_category')->dropdownList(
ProductCategory::find()->select(['category_name', 'id'])->indexBy('id')->column(),
Expand Down
8 changes: 5 additions & 3 deletions docs/guide-fr/output-data-widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,11 @@ La plupart du temps, utiliser les filtres de l'entête de la vue en grille suffi
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\PostSearch */
/* @var $form yii\widgets\ActiveForm */
/**
* @var \yii\web\View $this
* @var \app\models\PostSearch $model
* @var \yii\widgets\ActiveForm $form
*/
?>

<div class="post-search">
Expand Down
14 changes: 9 additions & 5 deletions docs/guide-fr/structure-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ Comme nous l'avons dit ci-dessus, une vue n'est rien d'autre qu'un script PHP in
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model app\models\LoginForm */
/**
* @var \yii\web\View $this
* @var \yii\widgets\ActiveForm $form
* @var \app\models\LoginForm $model
*/

$this->title = 'Login';
?>
Expand Down Expand Up @@ -262,8 +264,10 @@ L'exemple qui suit montre à quoi ressemble une disposition. Notez que dans un b
<?php
use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $content string */
/**
* @var \yii\web\View $this
* @var string $content
*/
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
Expand Down
6 changes: 3 additions & 3 deletions docs/guide-ja/input-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ $items = Category::find()
ActiveField の [[\yii\widgets\ActiveField::dropDownList()]] メソッドを使って、ドロップダウン・リストを作ることが出来ます。

```php
/* @var $form yii\widgets\ActiveForm */
/** @var \yii\widgets\ActiveForm $form */

echo $form->field($model, 'category')->dropdownList([
1 => '項目 1',
Expand All @@ -177,7 +177,7 @@ echo $form->field($model, 'category')->dropdownList([
ActiveField の [[\yii\widgets\ActiveField::radioList()]] メソッドを使ってラジオ・リストを作ることが出来ます。

```php
/* @var $form yii\widgets\ActiveForm */
/** @var \yii\widgets\ActiveForm $form */

echo $form->field($model, 'category')->radioList([
1 => 'ラジオ 1',
Expand All @@ -190,7 +190,7 @@ echo $form->field($model, 'category')->radioList([
ActiveField の [[\yii\widgets\ActiveField::checkboxList()]] メソッドを使ってチェックボックス・リストを作ることが出来ます。

```php
/* @var $form yii\widgets\ActiveForm */
/** @var \yii\widgets\ActiveForm $form */

echo $form->field($model, 'category')->checkboxList([
1 => 'チェックボックス 1',
Expand Down
8 changes: 5 additions & 3 deletions docs/guide-ja/output-data-widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,11 @@ echo GridView::widget([
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\PostSearch */
/* @var $form yii\widgets\ActiveForm */
/**
* @var \yii\web\View $this
* @var \app\models\PostSearch $model
* @var \yii\widgets\ActiveForm $form
*/
?>

<div class="post-search">
Expand Down
14 changes: 9 additions & 5 deletions docs/guide-ja/structure-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model app\models\LoginForm */
/**
* @var \yii\web\View $this
* @var \yii\widgets\ActiveForm $form
* @var \app\models\LoginForm $model
*/

$this->title = 'ログイン';
?>
Expand Down Expand Up @@ -324,8 +326,10 @@ $this->params['breadcrumbs'][] = 'About Us';
<?php
use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $content string */
/**
* @var \yii\web\View $this
* @var string $content
*/
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
Expand Down
14 changes: 9 additions & 5 deletions docs/guide-ja/tutorial-mailing.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ Yii は実際のメール・メッセージを特別なビュー・ファイル
use yii\helpers\Html;
use yii\helpers\Url;

/* @var $this \yii\web\View ビュー・コンポーネントのインスタンス */
/* @var $message \yii\mail\BaseMessage 新しく作成されたメール・メッセージのインスタンス */
/**
* @var \yii\web\View $this ビュー・コンポーネントのインスタンス
* @var \yii\mail\BaseMessage $message 新しく作成されたメール・メッセージのインスタンス
*/

?>
<h2>ワン・クリックで私たちのサイトのホームページを訪問することが出来ます</h2>
Expand Down Expand Up @@ -143,9 +145,11 @@ Yii::$app->mailer->compose([
<?php
use yii\helpers\Html;

/* @var $this \yii\web\View ビュー・コンポーネントのインスタンス */
/* @var $message \yii\mail\MessageInterface 作成されるメッセージ */
/* @var $content string メイン・ビューのレンダリング結果 */
/**
* @var \yii\web\View $this ビュー・コンポーネントのインスタンス
* @var \yii\mail\MessageInterface $message 作成されるメッセージ
* @var string $content メイン・ビューのレンダリング結果
*/
?>
<?php $this->beginPage() ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Expand Down
6 changes: 3 additions & 3 deletions docs/guide-pl/input-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Wartość pola formularza (i aktualnie aktywny element) będzie automatycznie us
Możemy użyć metody klasy ActiveForm [[yii\widgets\ActiveForm::dropDownList()|dropDownList()]] do utworzenia rozwijanej listy:

```php
/* @var $form yii\widgets\ActiveForm */
/** @var \yii\widgets\ActiveForm $form */

echo $form->field($model, 'category')->dropdownList([
1 => 'item 1',
Expand All @@ -166,7 +166,7 @@ echo $form->field($model, 'category')->dropdownList([
Do stworzenia takiej listy możemy użyć metody ActiveField [[\yii\widgets\ActiveField::radioList()]]:

```php
/* @var $form yii\widgets\ActiveForm */
/** @var \yii\widgets\ActiveForm $form */

echo $form->field($model, 'category')->radioList([
1 => 'radio 1',
Expand All @@ -179,7 +179,7 @@ echo $form->field($model, 'category')->radioList([
Do stworzenia takiej listy możemy użyć metody ActiveField [[\yii\widgets\ActiveField::checkboxList()]]:

```php
/* @var $form yii\widgets\ActiveForm */
/** @var \yii\widgets\ActiveForm $form */

echo $form->field($model, 'category')->checkboxList([
1 => 'checkbox 1',
Expand Down
16 changes: 10 additions & 6 deletions docs/guide-pl/tutorial-mailing.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ use yii\helpers\Html;
use yii\helpers\Url;


/* @var $this \yii\web\View instancja komponentu View */
/* @var $message \yii\mail\BaseMessage instancja nowo utworzonej wiadomości email */
/**
* @var \yii\web\View $this instancja komponentu View
* @var \yii\mail\BaseMessage $message instancja nowo utworzonej wiadomości email
*/

?>
<h2>Ta wiadomość pozwala Ci odwiedzić stronę główną naszej witryny przez jedno kliknięcie</h2>
Expand Down Expand Up @@ -138,9 +140,11 @@ Szalony mogą zostać użyte do ustawienia styli CSS, lub innej wspólnej treśc
<?php
use yii\helpers\Html;

/* @var $this \yii\web\View view component instance */
/* @var $message \yii\mail\MessageInterface the message being composed */
/* @var $content string main view render result */
/**
* @var \yii\web\View $this view component instance
* @var \yii\mail\MessageInterface $message the message being composed
* @var string $content main view render result
*/
?>
<?php $this->beginPage() ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Expand Down Expand Up @@ -223,4 +227,4 @@ Aby utworzyć swoje własne rozwiązanie mailingowe, musisz utworzyć dwie klasy
Możesz rozszerzyć klasy [[yii\mail\BaseMailer|BaseMailer]] i [[yii\mail\BaseMessage|BaseMessage]] jako bazowe klasy do tego rozwiązania.
Zawierają one podstawową logikę mechanizmu mailingu, który został opisany w tej sekcji.
Oczywiście ich użycie nie jest obowiązkowe, wystarczy zaimplementowanie interfejsów [[yii\mail\MailerInterface|MailerInterface]] oraz [[yii\mail\MessageInterface|MessageInterface]].
Następnie musisz zaimplementować wszystkie abstrakcyjne metody do swoich klas.
Następnie musisz zaimplementować wszystkie abstrakcyjne metody do swoich klas.
14 changes: 9 additions & 5 deletions docs/guide-pt-BR/structure-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ as partes de conteúdo dinâmicas, tais como o título da página e o formulári
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model app\models\LoginForm */
/**
* @var \yii\web\View $this
* @var \yii\widgets\ActiveForm $form
* @var \app\models\LoginForm $model
*/

$this->title = 'Login';
?>
Expand Down Expand Up @@ -365,8 +367,10 @@ como tags no head, menu principal, etc.
<?php
use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $content string */
/**
* @var \yii\web\View $this
* @var string $content
*/
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
Expand Down
8 changes: 5 additions & 3 deletions docs/guide-ru/input-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ echo $form->field($model, 'items[]')->checkboxList(['a' => 'Item A', 'b' => 'Ite
```php
use app\models\ProductCategory;

/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model app\models\Product */
/**
* @var \yii\web\View $this
* @var \yii\widgets\ActiveForm $form
* @var \app\models\Product $model
*/

echo $form->field($model, 'product_category')->dropdownList(
ProductCategory::find()->select(['category_name', 'id'])->indexBy('id')->column(),
Expand Down
8 changes: 5 additions & 3 deletions docs/guide-ru/output-data-widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,11 @@ echo GridView::widget([
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\PostSearch */
/* @var $form yii\widgets\ActiveForm */
/**
* @var \yii\web\View $this
* @var \app\models\PostSearch $model
* @var \yii\widgets\ActiveForm $form
*/
?>

<div class="post-search">
Expand Down
14 changes: 9 additions & 5 deletions docs/guide-ru/structure-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model app\models\LoginForm */
/**
* @var \yii\web\View $this
* @var \yii\widgets\ActiveForm $form
* @var \app\models\LoginForm $model
*/

$this->title = 'Вход';
?>
Expand Down Expand Up @@ -269,8 +271,10 @@ $this->params['breadcrumbs'][] = 'О нас';
<?php
use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $content string */
/**
* @var \yii\web\View $this
* @var string $content
*/
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
Expand Down
14 changes: 9 additions & 5 deletions docs/guide-ru/tutorial-mailing.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ use yii\helpers\Html;
use yii\helpers\Url;


/* @var $this \yii\web\View view component instance */
/* @var $message \yii\mail\BaseMessage instance of newly created mail message */
/**
* @var \yii\web\View $this view component instance
* @var \yii\mail\BaseMessage $message instance of newly created mail message
*/

?>
<h2>This message allows you to visit our site home page by one click</h2>
Expand Down Expand Up @@ -136,9 +138,11 @@ Yii::$app->mailer->compose([
<?php
use yii\helpers\Html;

/* @var $this \yii\web\View view component instance */
/* @var $message \yii\mail\MessageInterface the message being composed */
/* @var $content string main view render result */
/**
* @var \yii\web\View $this view component instance
* @var \yii\mail\MessageInterface $message the message being composed
* @var string $content main view render result
*/
?>
<?php $this->beginPage() ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Expand Down
Loading