public function getParents($includeSelf = false)
    {
        $parentsId = $this->getParentsId($includeSelf);
        $orderBy = [];
        foreach ( $parentsId as $id ) {
            $orderBy[] = "`$this->primaryKey` = $id DESC";
        }
        return call_user_func("$this->ownerClassName::find")
            ->where([
                $this->primaryKey => $parentsId,
            ])
            ->orderBy(implode(', ', $orderBy));
    }
public function getParents($includeSelf = false)
    {
        $parentsId = $this->getParentsId($includeSelf);
        $orderBy = [];
        foreach ( $parentsId as $id ) {
            $orderBy[] = "`$this->primaryKey` = $id DESC";
        }
        return call_user_func("$this->ownerClassName::find")
            ->where([
                $this->primaryKey => $parentsId,
            ])
            ->orderBy(implode(', ', $orderBy));
    }
public function getParents ( $ includeSelf = false ) { $ parentsId = $ this -> getParentsId ( $ includeSelf ) ; $ orderBy = [ ] ; foreach ( $ parentsId as $ id ) { $ orderBy [ ] = "`$this->primaryKey` = $id DESC" ; } return call_user_func ( "$this->ownerClassName::find" ) -> where ( [ $ this -> primaryKey => $ parentsId , ] ) -> orderBy ( implode ( ', ' , $ orderBy ) ) ; }
Return parents, ordered by level
@param boolean $includeSelf
@return \yii\db\ActiveQueryInterface
Return parents ordered by level