예제 #1
0
파일: Post.php 프로젝트: pramana08/app-cms
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPostType()
 {
     return $this->hasOne(PostType::className(), ['id' => 'post_type']);
 }
예제 #2
0
파일: Taxonomy.php 프로젝트: ochiem/app-cms
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPostTypes()
 {
     return $this->hasMany(PostType::className(), ['id' => 'post_type_id'])->viaTable('{{%post_type_taxonomy}}', ['taxonomy_id' => 'id']);
 }