255, ], [ [ 'blog_tag_id', 'language_id', ], 'unique', 'targetAttribute' => [ 'blog_tag_id', 'language_id', ], 'message' => 'The combination of Blog Tag ID and Language ID has already been taken.', ], [ [ 'blog_tag_id' ], 'exist', 'skipOnError' => true, 'targetClass' => BlogTag::className(), 'targetAttribute' => [ 'blog_tag_id' => 'id' ], ], [ [ 'language_id' ], 'exist', 'skipOnError' => true, 'targetClass' => Language::className(), 'targetAttribute' => [ 'language_id' => 'id' ], ], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'blog_tag_id' => 'Blog Tag ID', 'language_id' => 'Language ID', 'label' => 'Label', ]; } /** * @return \yii\db\ActiveQuery */ public function getBlogTag() { return $this->hasOne(BlogTag::className(), [ 'id' => 'blog_tag_id' ]); } /** * @return \yii\db\ActiveQuery */ public function getLanguage() { return $this->hasOne(Language::className(), [ 'id' => 'language_id' ]); } }