255, ], [ [ 'label_id' ], 'exist', 'skipOnError' => true, 'targetClass' => Label::className(), 'targetAttribute' => [ 'label_id' => 'id' ], ], [ [ 'language_id' ], 'exist', 'skipOnError' => true, 'targetClass' => Language::className(), 'targetAttribute' => [ 'language_id' => 'id' ], ], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'label_id' => Yii::t('order', 'Label ID'), 'language_id' => Yii::t('order', 'Language ID'), 'title' => Yii::t('order', 'Title'), 'description' => Yii::t('order', 'Description'), ]; } /** * @return \yii\db\ActiveQuery */ public function getLabel() { return $this->hasOne(Label::className(), [ 'id' => 'label_id' ]); } /** * @return \yii\db\ActiveQuery */ public function getLanguage() { return $this->hasOne(Language::className(), [ 'id' => 'language_id' ]); } }