/** * @return \yii\db\ActiveQuery */ public function getVideos() { return $this->hasMany(Video::className(), ['course_id' => 'id'])->orderBy(['sort_order' => SORT_ASC])->all(); }
/** * @return \yii\db\ActiveQuery */ public function getVideo() { return $this->hasOne(Video::className(), ['id' => 'video_id']); }
public function getWeike() { return $this->hasOne(Video::className(), ['id' => 'rid']); }
/** * @return \yii\db\ActiveQuery */ public function getVideos() { return $this->hasMany(Video::className(), ['id' => 'video_id'])->viaTable('{{%video_caster}}', ['caster_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getVideos() { return $this->hasMany(Video::className(), ['video_source_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getVideos() { return $this->hasMany(Video::className(), ['author_id' => 'id']); }
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]); }); }