/**
  * @return \yii\db\ActiveQuery
  */
 public function getPostType()
 {
     return $this->hasOne(PostType::className(), ['id' => 'post_type_id']);
 }
Beispiel #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPostTypes()
 {
     return $this->hasMany(PostType::className(), ['id' => 'post_type_id'])->viaTable('{{%post_type_taxonomy}}', ['taxonomy_id' => 'id']);
 }