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