當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Model::scenarios方法代碼示例

本文整理匯總了PHP中yii\base\Model::scenarios方法的典型用法代碼示例。如果您正苦於以下問題:PHP Model::scenarios方法的具體用法?PHP Model::scenarios怎麽用?PHP Model::scenarios使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在yii\base\Model的用法示例。


在下文中一共展示了Model::scenarios方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios['login'] = ['username', 'password', 'verifyCode'];
     $scenarios['reg'] = ['username', 'password', 'verifyCode', 'confirmPassword'];
     return $scenarios;
 }
開發者ID:Crocodile26,項目名稱:php-1,代碼行數:7,代碼來源:UserForm.php

示例2: scenarios

 public function scenarios()
 {
     $scenarions = parent::scenarios();
     $scenarions[self::SCENARION_FULLINFO] = ['username', 'email', 'password'];
     $scenarions[self::SCENARION_ONLYEMAIL] = ['email'];
     return $scenarions;
 }
開發者ID:skeeks-cms,項目名稱:cms,代碼行數:7,代碼來源:SignupForm.php

示例3: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios[self::SCENARIO_AVATAR] = ['file'];
     $scenarios[self::SCENARIO_UPLOAD] = ['files'];
     return $scenarios;
 }
開發者ID:littleboss,項目名稱:simpleforum,代碼行數:7,代碼來源:UploadForm.php

示例4: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios[self::SCENARIO_LOGIN] = ['email', 'password'];
     $scenarios[self::SCENARIO_LOGIN_CAPTCHA] = ['email', 'password', 'captcha'];
     return $scenarios;
 }
開發者ID:Bibihelper,項目名稱:Project2015,代碼行數:7,代碼來源:LoginForm.php

示例5: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios['discharge'] = ['Money'];
     $scenarios['charge'] = ['Money'];
     return $scenarios;
 }
開發者ID:just-leo,項目名稱:cardgame-serial,代碼行數:7,代碼來源:AccountBalanceForm.php

示例6: scenarios

 /**
  * @inheritdoc
  */
 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios['default'] = ['username', 'password', 'rememberMe'];
     $scenarios['error'] = ['username', 'password', 'rememberMe', 'verifyCode'];
     return $scenarios;
 }
開發者ID:comaw,項目名稱:hashtag,代碼行數:10,代碼來源:LoginForm.php

示例7: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios['jur-validate'] = ['name', 'phone', 'address_reg', 'address_fact', 'inn', 'kpp', 'ogrn', 'r_sch', 'k_sch', 'bik', 'okpo', 'director', 'bank', 'city_id', 'experience'];
     $scenarios['client-validate'] = ['name', 'phone', 'address_reg', 'address_fact', 'inn', 'kpp', 'ogrn', 'r_sch', 'k_sch', 'bik', 'okpo', 'director', 'bank', 'city_id', 'experience'];
     return $scenarios;
 }
開發者ID:HejVkt,項目名稱:auto.only3.ru,代碼行數:7,代碼來源:Prepare.php

示例8: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios['user'] = ['firstname', 'lastname', 'email', 'phone', 'password', 'confirmPassword'];
     $scenarios['company'] = ['name', 'category_id', 'email', 'phone', 'description', 'password', 'confirmPassword'];
     return $scenarios;
 }
開發者ID:BayramovNicat,項目名稱:toyplan,代碼行數:7,代碼來源:SignupForm.php

示例9: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios[self::SCENARIO_EDIT] = ['email', 'status', '!username', '!id'];
     $scenarios[self::SCENARIO_RESET_PWD] = ['password'];
     return $scenarios;
 }
開發者ID:feijilei,項目名稱:simpleforum,代碼行數:7,代碼來源:UserForm.php

示例10: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios[self::SCENARIO_CREATE] = ['login', 'name', 'language', 'email', 'dateFormat', 'timeFormat', 'timeZone', 'newPass', 'newPassConfirm'];
     $scenarios[self::SCENARIO_UPDATE] = ['login', 'name', 'language', 'email', 'dateFormat', 'timeFormat', 'timeZone', 'newPass', 'newPassConfirm', 'isChangedPass'];
     $scenarios[self::SCENARIO_UPDATE_ACCOUNT] = ['name', 'language', 'email', 'dateFormat', 'timeFormat', 'timeZone', 'newPass', 'newPassConfirm', 'currentPass', 'isChangedPass'];
     return $scenarios;
 }
開發者ID:ufrgs-hyman,項目名稱:meican,代碼行數:8,代碼來源:UserForm.php

示例11: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios['search'] = ['name', 'description', 'rule_name'];
     $scenarios['create'] = ['name', 'description', 'rule_name', 'data'];
     $scenarios['update'] = ['name', 'description', 'rule_name', 'data'];
     return $scenarios;
 }
開發者ID:sea129,項目名稱:kbay,代碼行數:8,代碼來源:AuthItem.php

示例12: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     $scenarios['sendImage'] = ['name', 'subject', 'email', 'phone', 'body', 'attachments'];
     $scenarios['order'] = ['subject', 'name', 'email', 'phone', 'body', 'verifyCode'];
     $scenarios['feedback'] = ['name', 'subject', 'email', 'body', 'verifyCode'];
     return $scenarios;
 }
開發者ID:secondsano,項目名稱:mebel,代碼行數:8,代碼來源:ContactForm.php

示例13: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     /*$scenarios['short_register'] = ['username', 'email'];
       $scenarios['short_register2'] = ['username', 'email', 'password'];
       $scenarios['short_register3'] = ['email', 'password'];*/
     return $scenarios;
 }
開發者ID:logs12,項目名稱:yii2-flat,代碼行數:8,代碼來源:SignupForm.php

示例14: scenarios

 /**
  * @inheritdoc
  */
 public function scenarios()
 {
     $scenarios = parent::scenarios();
     foreach ($this->_behaviors as $name) {
         if (($behavior = $this->getBehavior($name)) instanceof \nineinchnick\usr\components\FormModelBehavior) {
             $scenarios = array_merge($scenarios, array_fill_keys($behavior->scenarios(), $scenarios[self::SCENARIO_DEFAULT]));
         }
     }
     return $scenarios;
 }
開發者ID:rumatakira,項目名稱:yii2-usr,代碼行數:13,代碼來源:BaseUsrForm.php

示例15: scenarios

 public function scenarios()
 {
     $scenarios = parent::scenarios();
     if (!array_key_exists('create', $scenarios)) {
         $scenarios['create'] = $scenarios['default'];
     }
     if (!array_key_exists('update', $scenarios)) {
         $scenarios['update'] = $scenarios['default'];
     }
     return $scenarios;
 }
開發者ID:semnt,項目名稱:tp01,代碼行數:11,代碼來源:_Base.php


注:本文中的yii\base\Model::scenarios方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。