当前位置: 首页>>代码示例>>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;未经允许,请勿转载。