255], [['code'], 'string', 'max' => 3], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'currency_id' => Yii::t('app', 'currency_id'), 'name' => Yii::t('app', 'name'), 'symbol' => Yii::t('app', 'symbol'), 'code' => Yii::t('app', 'code'), 'rate' => Yii::t('app', 'rate'), 'date_update' => Yii::t('app', 'date_update'), 'is_default' => Yii::t('app', 'is_default'), ]; } public static function getCurrencyDropdown() { return self::find()->select(['label', 'currency_id'])->indexBy('currency_id')->orderBy(['is_default' => SORT_DESC, 'currency_id' => SORT_ASC])->asArray()->column(); } }