src/MaterializedPathBehavior.php
public function getParents($depth = null)
    {
        /** @var \yii\db\ActiveQuery|MaterializedPathQueryTrait $query */
        $query = $this->owner->find();
        return $query->parentsOf($this->owner, $depth);
    }
public function getParents($depth = null)
    {
        /** @var \yii\db\ActiveQuery|MaterializedPathQueryTrait $query */
        $query = $this->owner->find();
        return $query->parentsOf($this->owner, $depth);
    }
public function getParents ( $ depth = null ) { /** @var \yii\db\ActiveQuery|MaterializedPathQueryTrait $query */ $ query = $ this -> owner -> find ( ) ; return $ query -> parentsOf ( $ this -> owner , $ depth ) ; }
Returns list of parents from root to self node.

@param int $depth = null
@return \yii\db\ActiveQuery
Returns list of parents from root to self node .