@param Stack $parent

@return Stack[]
541305
public function getChildrenStacks(Stack $parent)
    {
        return array_filter($this->data['stacks'], function (Stack $stack) use ($parent) {
            return $stack->getParent() === $parent;
        });
    }
627069
public function parentStack() {
        $p=$this->owner;
        
        while($p) {
            $stack[]=$p;
            if($p->FolderID && $p->FolderID>0) {
                $folder=$p->Folder();
                if(!empty($folder) && $folder!==false && $folder->ID!=0) {
                    $p=$folder;
                }
            }else {
                $p=$p->LanguageID ? $p->Language() : null;
            }
        }
        
        return $stack;
    }
970155
public function getFilter($parent)
    {
        if (!$parent) {
            throw new DcGeneralInvalidArgumentException('No parent model passed.');
        }

        $result = [];
        foreach ($this->getFilterArray() as $child) {
            $result[] = $this->parseFilter($child, $parent);
        }

        return $result;
    }
574774
private function getChildren($parentID)
    {
        $tmp = [];
        $count = 0;
        foreach($this->existingMenuLinks as $key => $menuLink){
            if ($menuLink['parent'] == $parentID) {
                $tmp[$count] = $menuLink;
                $count++;
            }
        }
        return $tmp;
    }
1368588
protected function _getList($parent, $path)
    {
        if (count($parent) == 0) {
            $this->_contents[] = $path;
        } else {
            foreach($parent as $_content) {
                $this->_getList($_content, ($path ? $path . DS : '')  . $_content['name']);
            }
        }
    }
774455
protected function normalizeListParentParameter($parent)
    {
        $separator = $this->getListParentSeparator();

        if (is_integer($parent) && $parent < 0 || is_string($parent) && preg_match('#-\d+#', $parent)) {
            $parent = (int) $parent;

            if ($parent < 0) {
                // The the parent that conforms to the index in the parent chain
                // This only works within the context of this model, so no cross-model logic is expected
                $index = count($this->listParents) + $parent - 1;

                if ($index >= 0 && isset($this->listParents[ $index ])) {
                    $parent = $this->listParents[ $index ]->relation . $separator . $this->listParents[ $index ]->key;
                } else {
                    $parent = null;
                }

            } else {
                $parent = null;
            }
        }

        if (is_string($parent) && false === strpos($parent, $separator)) {
            $parent = null;
        }

        return $parent;
    }
1165142
public function getParentAssociation(object $document) : ?array
    {
        $oid = spl_object_hash($document);

        return $this->parentAssociations[$oid] ?? null;
    }
506982
protected function getParentClasses(ClassReflection $class, array $parentClasses = [])
    {
        $parentClass = $class->getParentClass();
        if ($parentClass !== false) {
            $parentClasses[] = $parentClass;
            $parentClasses = $this->getParentClasses($parentClass, $parentClasses);
        }

        return $parentClasses;
    }
431182
public function parent($parent = null)
    {
        if ($parent === null) {
            return $this->_parent;
        }
        $this->_parent = $parent;

        return $this;
    }
1115339
function getParents(node) {
    var result = [];
    var parent = node.parent;
    while (parent != null) {
        result.push(parent);
        parent = parent.parent;
    }
    return result;
}
1349859
protected function getParentListeners($event)
    {
        $parentListeners = [];

        foreach ($this->listeners as $key => $listeners)
        {
            if ($event instanceof $key)
            {
                $parentListeners = array_merge($parentListeners, $listeners);
            }
        }

        return $parentListeners;
    }
497507
private function generateRoleHierarchy($params, $parent = "")
    {
        if (is_array($params))
        {
            foreach ($params as $key => $child)
            {
                if ($parent != "" && is_array($child))
                {
                    foreach ($child as $subkey => $subchild)
                    {
                        $this->roleHierarchy[$parent][] = $subkey;
                        if (is_array($child))
                        {
                            $this->generateRoleHierarchy($subchild, $subkey);
                        }
                    }
                }
                elseif (is_array($child))
                {
                    $this->generateRoleHierarchy($child, $key);
                }
                elseif (!isset($this->roleHierarchy[$parent]) || !in_array($child, $this->roleHierarchy[$parent]))
                {
                    $this->roleHierarchy[$parent][] = $child;
                }
            }
        }
        return $this->roleHierarchy;
    }
410101
public function bindParent($parent, $parentPropertyName = null)
    {
        $this->parent = $parent;
        $this->parentPropertyName = $parentPropertyName;
        return $this;
    }
582244
public function bindParent($parent, $parentPropertyName=NULL)
	{
		$this->_parent = $parent;
		$this->_parentPropertyName = $parentPropertyName;
		return $this;
	}
538417
private function _getParentArray($parent, $array)
    {
        foreach ($array as $section => $arraySection) {

            $sectionName = explode(':', $section);

            if (trim($sectionName[0]) == $parent) return $arraySection;
        }

        throw new NoSectionMatchesException('No section matches with ' . $parent);
    }
1201538
public function setParent(Step $parent = null)
    {
        if ($parent !== $this->parent) {
            $this->parent = $parent;

            if (null !== $parent) {
                $parent->addChild($this);
            }
        }

        return $this;
    }
335465
public static function get_subtype_parent($type) {
        self::init();

        if (isset(self::$parents[$type])) {
            return self::$parents[$type];
        }

        return null;
    }