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(); } }