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