Beispiel #1
0
 public function getParts($withChild = false)
 {
     $result = $this->hasMany(ServicesPartsRecord::className(), ['serviceId' => 'id', 'lang' => 'lang'])->position();
     if (!$withChild) {
         $result->andWhere(['parentId' => 0]);
     }
     return $result;
 }
Beispiel #2
0
 public function getChilds()
 {
     return $this->hasMany(ServicesPartsRecord::className(), ['parentId' => 'id', 'lang' => 'lang'])->position();
 }