Commit fd16ddfb by dianc

Category Model Changes

parent cddb71b4
......@@ -21,6 +21,9 @@ use Yii;
*/
class Category extends \yii\db\ActiveRecord
{
const STATUS_ACTIVE = 1;
const STATUS_NOT_ACTIVE = 2;
const STATUS_DELETED = 3;
/**
* @inheritdoc
*/
......@@ -77,4 +80,13 @@ class Category extends \yii\db\ActiveRecord
{
return new CategoryQuery(get_called_class());
}
public static function statuses()
{
return [
self::STATUS_ACTIVE => Yii::t('common', 'Active'),
self::STATUS_NOT_ACTIVE => Yii::t('common', 'Not Active'),
self::STATUS_DELETED => Yii::t('common', 'Deleted')
];
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment