Пример #1
0
 /**
  * @inheritdoc
  */
 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios['edit'] = ['name', 'color', 'description', 'website', 'tags', 'join_policy', 'visibility', 'default_content_visibility'];
     $scenarios['create'] = ['name', 'color', 'description', 'join_policy', 'visibility'];
     return $scenarios;
 }
Пример #2
0
 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios['edit'] = ['name', 'description', 'website', 'tags', 'join_policy', 'visibility'];
     if (Yii::$app->user->isAdmin()) {
         $scenarios['edit'][] = 'ldap_dn';
     }
     $scenarios['create'] = ['name', 'description', 'join_policy', 'visibility'];
     return $scenarios;
 }
Пример #3
0
 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios['login'] = ['username', 'password'];
     $scenarios['editAdmin'] = ['username', 'email', 'status'];
     $scenarios['registration_email'] = ['username', 'email'];
     $scenarios['registration'] = ['username'];
     return $scenarios;
 }
Пример #4
0
 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios['login'] = ['username', 'password'];
     $scenarios['editAdmin'] = ['username', 'email', 'group_id', 'super_admin', 'auth_mode', 'status'];
     $scenarios['registration'] = ['username', 'email', 'group_id'];
     return $scenarios;
 }