コード例 #1
0
ファイル: Video.php プロジェクト: dmstr/yii2-news-module
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVideoGallery()
 {
     return $this->hasOne(\dmstr\modules\news\models\VideoGallery::className(), ['id' => 'video_gallery_id']);
 }
コード例 #2
0
ファイル: News.php プロジェクト: dmstr/yii2-news-module
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVideoGalleries()
 {
     return $this->hasMany(\dmstr\modules\news\models\VideoGallery::className(), ['news_id' => 'id']);
 }