50], [['title', 'error'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => Yii::t('attr','email_record.id'), 'address' => Yii::t('attr','email_record.address'), 'title' => Yii::t('attr','email_record.title'), 'content' =>Yii::t('attr','email_record.content'), 'remarks' => Yii::t('attr','email_record.remarks'), 'error' =>Yii::t('attr','email_record.error'), 'type' => Yii::t('attr','email_record.type'), 'sent_time' => Yii::t('attr','email_record.sent_time'), ]; } public static function typeOptions($k=null) { $options = array('1'=>'验证码','2'=>'通用'); if(is_numeric($k))return $options[$k]; return $options; } }