"boostrap", self::ICON_TYPE_AWESOME => "awesome" ]; /** * {@inheritdoc} */ public static function tableName() { return 'category'; } /** * {@inheritdoc} */ public function rules() { return [ [['icon_type','cat_name','created_at'], 'required'], [['icon_type', 'sort_order', 'created_at', 'updated_at'], 'integer'], [['description'], 'string'], [['cat_name', 'icon'], 'string', 'max' => 64], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'cat_name' => '类名', 'icon' => 'Icon', 'icon_type' => '图标类型', 'description' => '描述', 'sort_order' => 'Sort Order', 'created_at' => '添加日期', 'updated_at' => 'Updated At', ]; } public function behaviors() { return [ TimestampBehavior::className() ]; } }