'; } public static function statusList(): array { return [ Language::STATUS_DRAFT => Yii::t('languages', 'Draft'), Language::STATUS_ACTIVE => Yii::t('languages', 'Active'), ]; } public static function statusName($status): string { return ArrayHelper::getValue(self::statusList(), $status); } public static function statusLabel($status): string { switch ($status) { case Language::STATUS_DRAFT: $class = 'label label-default'; break; case Language::STATUS_ACTIVE: $class = 'label label-success'; break; default: $class = 'label label-default'; } return Html::tag('span', ArrayHelper::getValue(self::statusList(), $status), [ 'class' => $class, ]); } }