Различия
Показаны различия между двумя версиями страницы.
| Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия | ||
| yii2:docs [2019/04/18 13:09] – [Active Record] mirocow | yii2:docs [2019/04/18 13:17] (текущий) – [Active Record] mirocow | ||
|---|---|---|---|
| Строка 432: | Строка 432: | ||
| // the result as an array | // the result as an array | ||
| $posts = $query-> | $posts = $query-> | ||
| + | </ | ||
| + | |||
| + | <code php> | ||
| + | User:: | ||
| + | User:: | ||
| </ | </ | ||
| Строка 535: | Строка 540: | ||
| { | { | ||
| return [ | return [ | ||
| - | [' | + | |
| - | ' | + | |
| - | // specifies in which scenario(s) this rule is active. | + | ' |
| - | // if not given, it means it is active in all scenarios | + | // specifies in which scenario(s) this rule is active. |
| - | ' | + | // if not given, it means it is active in all scenarios |
| - | // the following name-value pairs will be used | + | ' |
| - | // to initialize the validator properties | + | // the following name-value pairs will be used |
| - | ' | + | // to initialize the validator properties |
| - | ' | + | ' |
| - | // ... | + | ' |
| + | // ... | ||
| + | | ||
| + | [ | ||
| + | [' | ||
| + | ' | ||
| + | | ||
| + | // if not given, it means it is active in all scenarios | ||
| + | ' | ||
| + | // the following name-value pairs will be used | ||
| + | // to initialize the validator properties | ||
| + | ' | ||
| + | ' | ||
| + | // ... | ||
| + | ], | ||
| ]; | ]; | ||
| } | } | ||