50], [['args'], 'string', 'max' => 500], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => Yii::t('attr','email_tpl.id'), 'key' => Yii::t('attr','email_tpl.key'), 'title' => Yii::t('attr','email_tpl.title'), 'tpl' => Yii::t('attr','email_tpl.tpl'), 'args' => Yii::t('attr','email_tpl.args'), 'type' => Yii::t('attr','email_tpl.type'), ]; } public static function typeOptions($k=null) { $options = array('1'=>'验证码','2'=>'通用'); if(is_numeric($k))return $options[$k]; return $options; } }