['product_spec_id', 'language_id'], 'message' => 'The combination of Product Spec ID and Language ID has already been taken.'], [['language_id'], 'exist', 'skipOnError' => true, 'targetClass' => Language::className(), 'targetAttribute' => ['language_id' => 'language_id']], [['product_spec_id'], 'exist', 'skipOnError' => true, 'targetClass' => ProductSpec::className(), 'targetAttribute' => ['product_spec_id' => 'product_spec_id']], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'product_spec_id' => Yii::t('app', 'Product Spec ID'), 'language_id' => Yii::t('app', 'Language ID'), 'tech_spec_text' => Yii::t('app', 'Tech Spec Text'), 'instruction' => Yii::t('app', 'Instruction'), ]; } /** * @return \yii\db\ActiveQuery */ public function getLanguage() { return $this->hasOne(Language::className(), ['language_id' => 'language_id']); } /** * @return \yii\db\ActiveQuery */ public function getProductSpec() { return $this->hasOne(ProductSpec::className(), ['product_spec_id' => 'product_spec_id']); } }