Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPrevSection()
 {
     return $this->hasOne(Section::className(), ['id' => 'prev']);
 }
Пример #2
0
 /**
  * @return ActiveQuery
  */
 public function getSections()
 {
     return $this->hasMany(Section::className(), ['category_id' => 'id']);
 }
Пример #3
0
 /**
  * @return ActiveQuery
  */
 public function getSection()
 {
     return $this->hasOne(Section::className(), ['id' => 'section_id']);
 }
Пример #4
0
 /**
  * @return ActiveQuery
  */
 public function getChildren()
 {
     return $this->hasMany(Section::className(), ['section_id' => 'id'])->inverseOf('parent');
 }