Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTaxonomy()
 {
     return $this->hasOne(Taxonomy::className(), ['id' => 'taxonomy_id']);
 }
Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTaxonomies()
 {
     return $this->hasMany(Taxonomy::className(), ['id' => 'taxonomy_id'])->viaTable('{{%post_type_taxonomy}}', ['post_type_id' => 'id']);
 }