class UserRepository {
public function save(User $user)
{
$user->save();
}
public function findMale()
{
return User::find()->active()->male();
}
}
'pluginOptions' => [
'depends'=>['typ-id'],
'placeholder'=>'Sub...',
'initialize' => true,
'initDepends'=>['Cat'],
'url'=>Url::to(['orders/subcat']),
],
$model = Product::findOne(['id'=>1]);
$model->name="Новое название";
$model->save();