Get all parents of the current content item

@param bool $includeSelf

@return ContentInterface[]
518292
public function getParents($includeSelf = true)
    {
        $parents = [];

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

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

        return $parents;
    }
1082572
public function getIndexes( $includeParents = true )
    {

        // lazy load indexes
        if( !isset( $this->indexes ) ) {

            $this->indexes = $this->catalog->pgIndexes->findByIndrelid( $this->oid );

            // are we inheriting off another table
            if( $parent = $this->getParent() ) {

                foreach( $parent->getIndexes() as $parentIndex ) {

                    $data = $parentIndex->all();
                    $data['inherited'] = true;
                    $data['columns'] = [];

                    foreach( $parentIndex->indkey as $indkey ) {
                        $columns[] = sprintf( "%s.%s", $this->oid, $indkey );
                    }

                    $this->indexes->add(
                        new PgIndex( $this->catalog, $data )
                    );

                }

            }

        }

        // include parent indexes
        if( $includeParents ) {
            return $this->indexes->copy();
        } else {
            return $this->indexes->copy()->removeByInherited( true );
        }

    }
336386
public function getAllParents(array $options = []): array
    {
        $options = array_replace(
            [
                'indexById'     => false,
                'skipIds'       => []
            ],
            $options
        );
        $parents = [];
        $ids = [$this->getId()];

        /** @var NodeInterface $parent */
        foreach ($this->getParents() as $id => $parent) {
            if (in_array($id, $options['skipIds'])) {
                continue;
            }

            $ids[] = $id;

            if ($options['indexById']) {
                $parents[$id] = $parent;
            } else {
                $parents[] = $parent;
            }

            $parents = array_merge(
                $parents,
                $parent->getAllParents(array_merge($options, ['skipIds' => $ids]))
            );
        }

        return $parents;
    }
961217
public function getParentsId($includeSelf = false)
    {
        $cacheKey = [
            'class' => self::className(),
            'ownerClass' => $this->ownerClassName,
            'method' => 'getParentsId',
            'id' => $this->owner->{$this->primaryKey},
        ];
        if ( $this->owner->{$this->parentIdField} ) {
            $parents = $this->cache->getOrSet($cacheKey, function(){
                return self::getParentsIdRec($this->owner->{$this->parentIdField}, $this->ownerClassName, $this->primaryKey, $this->parentIdField);
            }, null, $this->getTagDependency());
        } else {
            $parents = [];
        }
        return $includeSelf ? array_merge($parents, [$this->owner->{$this->primaryKey}]) : $parents;
    }
23987
public function findParents(array $filters = [], array $options = [])
    {
        $options = array_replace(
            [
                'returnFirstResult' => false,
                'indexById'         => false
            ],
            $options
        );
        $parents = $this->getAllParents($options);

        if ($parents && $filters) {
            $result = [];

            /** @var NodeInterface $parent */
            foreach ($parents as $i => $parent) {
                foreach ($filters as $f => $v) {
                    $method = 'get' . ucfirst($f);

                    if (!method_exists($parent, $method) || $parent->$method() !== $v) {
                        continue 2;
                    }
                }

                if ($options['indexById']) {
                    $result[$i] = $parent;
                } else {
                    $result[] = $parent;
                }
            }
        } else {
            $result = $parents;
        }

        return $options['returnFirstResult'] && $result ?
            array_values($result)[0] :
            $result;
    }
606815
public function getParentsForBreadcrumbs(
    $entity,
        &$parents = []
    )
    {
        array_push($parents, $entity);
        if ($entity->parent !== null) {
            $this->getParentsForBreadcrumbs($entity->parent, $parents);
        }
        return array_reverse($parents);
    }
883547
function(fn, includeSelf) {
			var i,
				l,
				n,
				ac = this.parent.children;

			for (i = 0, l = ac.length; i < l; i++) {
				n = ac[i];
				if (includeSelf || n !== this) {
					if (fn(n) === false) {
						return false;
					}
				}
			}
			return true;
		}
168472
public static function getStringOperands($includeSelector = false)
    {
        $values = array(
            self::STRING_STARTS,
            self::STRING_ENDS,
            self::STRING_EQUALS,
            self::STRING_CONTAINS,
        );

        if ($includeSelector) {
            $values[] = self::OPERAND_SELECTOR;
        }

        return $values;
    }
839713
protected function getBooleanSelectList($includeNull = false)
    {
        $results = array();
        if( $includeNull ) {
            $results[ '' ] = Translate::recursive('common.both');
        }

        $results[ 0 ] = Translate::recursive('common.no');
        $results[ 1 ] = Translate::recursive('common.yes');

        return $results;
    }
1235594
public function getParent($parentId)
    {
        if ($parentId && isset($this->site->pages[$parentId])) {
            return $this->site->pages[$parentId];
        }

        return [];
    }
347568
public function getNodeTypes($includeAbstractNodeTypes = true)
    {
        if ($this->cachedNodeTypes === []) {
            $this->loadNodeTypes();
        }
        if ($includeAbstractNodeTypes) {
            return $this->cachedNodeTypes;
        }

        $nonAbstractNodeTypes = array_filter($this->cachedNodeTypes, function ($nodeType) {
            return !$nodeType->isAbstract();
        });

        return $nonAbstractNodeTypes;
    }
450378
public function get_parent_context_paths($includeself = false) {
        if (empty($this->_path)) {
            return array();
        }

        $contextids = explode('/', $this->_path);

        $path = '';
        $paths = array();
        foreach ($contextids as $contextid) {
            if ($contextid) {
                $path .= '/' . $contextid;
                $paths[$contextid] = $path;
            }
        }

        if (!$includeself) {
            unset($paths[$this->_id]);
        }

        return $paths;
    }
981879
public function getContentsParentUids($contentUids)
    {
        $contentUids = (array) $contentUids;
        if (0 === count($contentUids)) {
            return [];
        }

        $contentUids = implode(', ', array_unique(array_map(function ($uid) {
            return '"'.$uid.'"';
        }, $contentUids)));

        $parentUids = $this->_em->getConnection()->executeQuery(
            sprintf('SELECT parent_uid FROM content_has_subcontent WHERE content_uid IN (%s)', $contentUids)
        )->fetchAll(\PDO::FETCH_COLUMN);

        return array_merge($parentUids, $this->getContentsParentUids($parentUids));
    }
186271
public function descendants($includeSelf = false, $depth = null)
    {
        $this
            ->getQuerySet()
            ->descendants($includeSelf, $depth);

        return $this;
    }
163293
public function collateAncestorIDs()
    {
        $parent = $this;
        $items = [];
        while ($parent instanceof Group) {
            $items[] = $parent->ID;
            $parent = $parent->getParent();
        }
        return $items;
    }
14363
public function descendants($includeSelf = false, $depth = null)
    {
        $this->filter([
            'lft__gte' => $this->getModel()->lft,
            'rgt__lte' => $this->getModel()->rgt,
            'root' => $this->getModel()->root,
        ])->order(['lft']);

        if (false === $includeSelf) {
            $this->exclude([
                'pk' => $this->getModel()->pk,
            ]);
        }

        if (null !== $depth) {
            $this->filter([
                'level__lte' => $this->getModel()->level + $depth,
            ]);
        }

        return $this;
    }
444474
public function getAncestors($ignoreSelf = false)
    {
        $ancestors = [];

        if (false === $ignoreSelf) {
            $ancestors[$this->name] = $this->appName;
        }

        /** @var $parent Node */
        foreach ($this->parent as $parent) {
            $parentAncenstors = $parent->getAncestors();

            $ancestors = array_merge($parentAncenstors, $ancestors);
        }

        return $ancestors;
    }