0], [['product_id'], 'exist', 'skipOnError' => true, 'targetClass' => Product::className(), 'targetAttribute' => ['product_id' => 'product_id']], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'product_to_rating_id' => 'Product To Rating ID', 'product_id' => 'Product ID', 'value' => 'Value', ]; } /** * @return \yii\db\ActiveQuery */ public function getProduct() { return $this->hasOne(Product::className(), ['product_id' => 'product_id']); } }