예제 #1
0
파일: Meta.php 프로젝트: luobenyu/blog-1
 public function getChilds()
 {
     return $this->hasMany(Meta::className(), ['parent_id' => 'id']);
 }
예제 #2
0
 private function __construct()
 {
     self::$model = \Yii::$container->get(Meta::className());
 }
예제 #3
0
파일: Content.php 프로젝트: luobenyu/blog-1
 public function getTags()
 {
     return $this->hasMany(Meta::className(), ['id' => 'meta_id'])->where(['status' => Meta::STATUS_ACTIVE, 'type' => Meta::TYPE_TAG])->viaTable(Relationship::tableName(), ['content_id' => 'id']);
 }
예제 #4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getMeta()
 {
     return $this->hasOne(Meta::className(), ['id' => 'meta_id']);
 }