Returns whether the index will only show the top level parents.

@return bool
507003
protected function showsTopParentsOnly()
    {
        $relation = $this->getModelInformation()->list->default_top_relation;

        // If the default is to restrict to top-level only,
        // or the reverse with a user-initiated reversal (relation = false):
        // Restrict the query to top level.

        return $relation && false !== $this->listParentRelation;
    }
869182
public function isDirty()
    {
        return true === parent::isDirty()
            || true === $this->hasOneRelationships->areDirty()
            || true === $this->hasManyRelationships->areDirty()
        ;
    }
461995
public function getAllParents()
    {
        $parents = array();

        $parent = $this;

        while ($parent = $parent->getParent()) {
            $parents[] = $parent;
        }

        return $parents;
    }
1357894
public function getLevel()
    {
        if ($this->_level !== null) {
            return $this->_level;
        }

        if ($this->isRoot()) {
            $this->_level = -1;
            return $this->_level;
        }

        $parents = array($this);
        $node = $this;

        while ($parent = $node->getParent()){
            if (!$parent->isRoot()) {
                $parents[] = $parent;
            }
            $node = $parent;
        }

        $this->_level = count($parents);

        return $this->_level;
    }
100773
private boolean isParentLeftToRight() {
        if (rootParent instanceof JFrame) {
            return SeaGlassLookAndFeel.isLeftToRight((JFrame) rootParent);
        } else if (rootParent instanceof JDialog) {
            return SeaGlassLookAndFeel.isLeftToRight((JDialog) rootParent);
        } else {
            return false;
        }
    }
1008811
public function isDescendantOf(ChildCategory $parent)
    {
        return $this->isInTree() && $this->getLeftValue() > $parent->getLeftValue() && $this->getRightValue() < $parent->getRightValue();
    }
599441
function() {
			var i,
				l,
				parents = this.getParentList(false, false);

			for (i = 0, l = parents.length; i < l; i++) {
				if (!parents[i].expanded) {
					return false;
				}
			}
			return true;
		}
333996
public function hasUnactiveContainer()
    {
        $parent = $this->parent_uid;
        if (preg_match_all('|\{(\d+)\}|', $parent, $matches)) {
            if (!empty($matches[1])) {
                foreach($matches[1] as $nextDbId) {
                    if (!static::isActive($nextDbId)) return true;
                }
            }
        }
        return false;
    }
647187
public function hierarchy()
    {
        if ($this->hierarchy === null) {
            $hierarchy = [];

            $parent = $this->getParent();
            while ($parent) {
                $hierarchy[] = $parent;
                $parent = $parent->getParent();
            }

            $this->hierarchy = $hierarchy;
        }

        return $this->hierarchy;
    }
161041
public function getListParent()
    {
        $parent = session()->get($this->getSessionKey(static::TYPE_PARENT));

        if (null === $parent) {
            return null;
        }

        if (static::PARENT_DISABLE === $parent) {
            return false;
        }

        list($relation, $key) = explode(':', $parent, 2);

        return compact('relation', 'key');
    }
219811
protected function hasData(array $parents)
    {
        $countryCode = $parents[0];
        $addressFormat = $this->addressFormatRepository->get($countryCode);
        $depth = $addressFormat->getSubdivisionDepth();
        if ($depth == 0) {
            return false;
        }
        // At least the first level has data.
        $hasData = true;
        if (count($parents) > 1) {
            // After the first level it is possible for predefined subdivisions
            // to exist at a given level, but not for that specific parent.
            // That's why the parent definition has the most precise answer.
            $grandparents = $parents;
            $parentId = array_pop($grandparents);
            $parentGroup = $this->buildGroup($grandparents);
            if (isset($this->definitions[$parentGroup]['subdivisions'][$parentId])) {
                $definition = $this->definitions[$parentGroup]['subdivisions'][$parentId];
                $hasData = !empty($definition['has_children']);
            } else {
                // The parent definition wasn't loaded previously, fallback
                // to guessing based on depth.
                $neededDepth = count($parents);
                $hasData = ($neededDepth <= $depth);
            }
        }
        return $hasData;
    }
957791
public function getParentServer()
    {
      if ($this->_parentServer) return $this->_parentServer;
      
      $fields = self::getDbConnection()->fetchAssoc( 
          " SELECT C.*
    		    FROM dir_structure B, dir_structure A, dir_data C
    		    WHERE A.data_id=? and B.lft<=A.lft and B.rght>=A.lft and
    		    B.data_id=C.id and C.is_server<>0", 
          array( (int)$this->id )
      );
      
      if ($fields) {
          $this->_parentServer = Server::fetch($fields);
          return $this->_parentServer;
      }
      return FALSE;
    }
1134338
protected function failsParentMatch(array $parents)
    {
        // just verify that the url structure is correct
        // and that we can find parents with the appropriate ids
        // the $parents (ids) go from most senior parent to least senior parent
        // but we need to check for the reverse of this
        $resource = $this->resource->getParentResource();

        foreach (array_reverse($parents) as $parentId) {
            if (!$resource->single($parentId)) {
                return true;
            }

            $resource = $resource->getParentResource();
        }

        return false;
    }
827798
private function hasSearchIndex()
    {
        $metadata = $this->repository->getClassMetadata();
        $indexes = $metadata->getIndexes();
        if (empty($indexes)) {
            return false;
        }

        $text = array_filter(
            $indexes,
            function ($index) {
                if (isset($index['keys'])) {
                    $hasText = false;
                    foreach ($index['keys'] as $name => $direction) {
                        if ($direction == 'text') {
                            $hasText = true;
                        }
                    }
                    return $hasText;
                }
            }
        );

        return !empty($text);
    }
652501
public function getParentsList()
    {
        /** @var static $root */
        $root  = static::root();
        $items = [
            ['id' => '1', 'title' => 'Item Root'],
        ];

        if ($this->exists) {
            $parents = $this->ancestors()
                            ->withoutRoot()
                            ->orWhere(function ($query) {
                                $query->where('depth', $this->depth)->where('id', '<>', $this->id);
                            })
                            ->get();
            foreach ($parents as $parent) {
                $items[] = [
                    'title' => $parent->present()->indentedTitle(),
                    'id'    => $parent->id,
                ];
            }
        } else {
            foreach ($root->getDescendants() as $parent) {
                $items[] = [
                    'title' => $parent->present()->indentedTitle(),
                    'id'    => $parent->id,
                ];
            }
        }

        return array_pluck($items, 'title', 'id');
    }
1286433
public function getSiblings() {
        $parent = $this->getParent();
        if (is_null($parent)) {
            // This is the root node.
            return [];
        }

        $children = $parent->getChildren();
        $index = array_search($this, $children);
        unset($children[$index]);
        return $children;
    }
1109310
public function getParents()
    {
        $parents = [];
        if ($this->parent && !$this->parent instanceof Root) {
            $parents = $this->parent->getParents();
            $parents[] = $this->parent;
        }

        return $parents;
    }