Exemple #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVideos()
 {
     return $this->hasMany(Video::className(), ['course_id' => 'id'])->orderBy(['sort_order' => SORT_ASC])->all();
 }
Exemple #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVideo()
 {
     return $this->hasOne(Video::className(), ['id' => 'video_id']);
 }
Exemple #3
0
 public function getWeike()
 {
     return $this->hasOne(Video::className(), ['id' => 'rid']);
 }
Exemple #4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVideos()
 {
     return $this->hasMany(Video::className(), ['id' => 'video_id'])->viaTable('{{%video_caster}}', ['caster_id' => 'id']);
 }
Exemple #5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVideos()
 {
     return $this->hasMany(Video::className(), ['video_source_id' => 'id']);
 }
Exemple #6
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVideos()
 {
     return $this->hasMany(Video::className(), ['author_id' => 'id']);
 }
Exemple #7
0
 public function getVideos()
 {
     return $this->hasMany(Video::className(), ['id' => 'entity_2_id'])->viaTable(EntityLink::tableName(), ['entity_1_id' => 'id'], function ($query) {
         $query->onCondition(['entity_1' => Item::THIS_ENTITY, 'entity_2' => Video::THIS_ENTITY]);
     });
 }