Exemple #1
0
 /**
  * Get all sections belongs to the same ancestor.
  * @return yii\db\ActiveQueryInterface
  */
 public function getDescendentSections()
 {
     return $this->hasMany(Sections::className(), ['ancestor' => 'id']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getSection()
 {
     return $this->hasOne(Sections::className(), ['recid' => 'sectionid']);
 }