예제 #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getMediafiles()
 {
     return $this->hasMany(Mediafile::className(), ['id' => 'mediafile_id'])->viaTable('filemanager_mediafile_tag', ['tag_id' => 'id']);
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getMediafile()
 {
     return $this->hasOne(Mediafile::className(), ['id' => 'mediafile_id']);
 }