Exemple #1
0
 public function getChilds()
 {
     return $this->hasMany(Meta::className(), ['parent_id' => 'id']);
 }
Exemple #2
0
 private function __construct()
 {
     self::$model = \Yii::$container->get(Meta::className());
 }
Exemple #3
0
 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']);
 }
Exemple #4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getMeta()
 {
     return $this->hasOne(Meta::className(), ['id' => 'meta_id']);
 }