public function getParents($includeSelf = true)
    {
        $parents = [];

        if (null !== $this->parent) {
            $parents = $this->getParent()->getParents();
        }

        if ($includeSelf) {
            $parents[] = $this;
        }

        return $parents;
    }
public function getParents($includeSelf = true)
    {
        $parents = [];

        if (null !== $this->parent) {
            $parents = $this->getParent()->getParents();
        }

        if ($includeSelf) {
            $parents[] = $this;
        }

        return $parents;
    }
public function getParents ( $ includeSelf = true ) { $ parents = [ ] ; if ( null !== $ this -> parent ) { $ parents = $ this -> getParent ( ) -> getParents ( ) ; } if ( $ includeSelf ) { $ parents [ ] = $ this ; } return $ parents ; }
Get all parents of the current content item

@param bool $includeSelf

@return ContentInterface[]
Get all parents of the current content item