true, 'targetClass' => Articles::className(), 'targetAttribute' => [ 'articles_id' => 'id' ], ], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'article_to_rating_id' => 'Article To Rating ID', 'articles_id' => 'Articles ID', 'value' => 'Value', ]; } /** * @return \yii\db\ActiveQuery */ public function getArticles() { return $this->hasOne(Articles::className(), [ 'id' => 'articles_id' ]); } }