Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCmsNews()
 {
     return $this->hasOne(CmsNews::className(), ['id' => 'cms_news_id']);
 }
Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCmsNews()
 {
     return $this->hasMany(CmsNews::className(), ['cms_news_group_id' => 'id']);
 }