コード例 #1
0
ファイル: Author.php プロジェクト: RubenDjOn/originofthememes
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVidmageAuthors()
 {
     return $this->hasMany(\common\models\VidmageAuthor::className(), ['author_id' => 'id']);
 }
コード例 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getMainAuthor()
 {
     return $this->hasOne(\common\models\VidmageAuthor::className(), ['vidmage_id' => 'id'])->where(['is_main_author' => true]);
 }