Returns a single child pseudo page

@see getChildPseudoPages
@return Kwf_Component_Data
484558
public function getChildPseudoPage($select = array())
    {
        if (is_array($select)) {
            $select = new Kwf_Component_Select($select);
        }
        $select->limit(1);
        $ret = $this->getChildPseudoPages($select);
        if (!$ret) return null;
        return current($ret);
    }
443679
public function getParentPseudoPage()
    {
        $page = $this->getPseudoPage();
        if ($page && $page->parent) {
            return $page->parent->getPseudoPage();
        }
        return null;
    }
157704
public function findSection() {
		$page = $this;
		while ($page && $page->ID) {
			if ($page->ParentID == 0 || $page->PrimaryNewsSection) {
				return $page;
			}
			$page = $page->Parent();
		}
	}
1155606
public function getChildren()
    {
        $result = null;

        if($this->hasChildren())
        {
            $parent = $this->id;

            if(!$this->__children[$parent] instanceof DatabaseRowsetInterface)
            {
                $this->__children[$parent] = $this->getTable()->createRowset(array(
                    'data' => $this->__children[$parent]
                ));
            }

            $result = $this->__children[$parent];
        }

        return $result;
    }
398627
public function getChildren()
    {
        $children = [];
        foreach ($this->children as $type) {
            foreach ($type as $child) {
                $children[] = $child;
            }
        }

        return $children;
    }
988836
public function getPage()
    {
        $page = $this;
        if ($this->isPage) return $this;
        if (isset($this->_lazyParent)) {
            //optimierung: hier koennen eventuell ein paar nicht-pages uebersprungen werden
            $id = $this->_lazyParent;
            if (is_numeric($id) || strpos($id, '-') === false) {
                //ist eine page
            } else {
                if (strpos($id, '_') === false) {
                    $id = substr($id, 0, strpos($id, '-'));
                    if (!is_numeric($id)) {
                        return null;
                    }
                } else {
                    $underScorePos = strrpos($id, '_');
                    $hyphenPos = strpos($id, '-', $underScorePos);
                    if ($hyphenPos > $underScorePos) {
                        $id = substr($id, 0, $hyphenPos);
                    }
                }
            }
            return Kwf_Component_Data_Root::getInstance()->getComponentById($id, array('ignoreVisible'=>true));
        }
        while ($page && !$page->isPage) {
            $page = $page->parent;
        }
        return $page;
    }
61351
public function children()
    {
        return $this->menu->items->filter(function ($item) {
            return $item->hasParent() && $item->parent->name == $this->name;
        });
    }
702836
public function getEnabledChildren()
    {
        // Answer Cached Children (if available):
        
        if ($this->cacheEnabledChildren) {
            return $this->cacheEnabledChildren;
        }
        
        // Obtain Child Objects:
        
        $this->cacheEnabledChildren = $this->getAllChildren()->filterByCallback(function ($child) {
            return ($child instanceof Component) ? $child->isEnabled() : false;
        });
        
        // Answer Child Objects:
        
        return $this->cacheEnabledChildren;
    }
889318
public static function getLayout()
	{
		if(self::$pageLayout === null)
		{
			global $objPage;

			if($objPage !== null)
			{
				self::$pageLayout = \LayoutModel::findByPk($objPage->layout);
			}
		}

		return self::$pageLayout;
	}
526777
public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['viewCache'] = true;
        $ret['contentSender'] = 'Kwf_Component_Abstract_ContentSender_Default';
        $ret['layoutClass'] = 'Kwf_Component_Layout_Default';
        $ret['plugins'] = array();
        return $ret;
    }
771478
public function getPageGenerators()
    {
        if (!is_null($this->_pageGenerators)) return $this->_pageGenerators;

        $cacheId = $this->componentClass . '_pageGenerators';

        $generators = Kwf_Cache_SimpleStatic::fetch($cacheId);
        if (!$generators) {
            $generators = array();
            foreach (Kwc_Abstract::getComponentClasses() as $class) {
                foreach (Kwc_Abstract::getSetting($class, 'generators') as $key => $generator) {
                    if (!isset($generator['class'])) {
                        throw new Kwf_Exception("no generator class set for generator '$key' in component '$class'");
                    }
                    if (is_instance_of($generator['class'], 'Kwc_Root_Category_Generator')) {
                        $generators[] = array('class' => $class, 'key' => $key, 'generator' => $generator);
                    }
                }
            }
            Kwf_Cache_SimpleStatic::add($cacheId, $generators);
        }

        $this->_pageGenerators = array();
        foreach ($generators as $g) {
            $this->_pageGenerators[] = Kwf_Component_Generator_Abstract::getInstance(
                $g['class'], $g['key'], $g['generator']
            );
        }
        return $this->_pageGenerators;
    }
846796
public function getParentPage()
    {
        $page = $this->getPage();
        if ($page && $page->parent) {
            return $page->parent->getPage();
        }
        return null;
    }
1316667
public function getParentPageOrRoot()
    {
        $page = $this->getPageOrRoot();
        if ($page->parent) {
            return $page->parent->getPageOrRoot();
        }
        return $page;
    }
377421
public function getLevel()
    {
        if ($page = $this->getCurrentPage(Page::class)) {
            
            if (!$page->Children()->exists()) {
                
                $parent = $page->getParent();
                
                while ($parent && !$parent->Children()->exists()) {
                    $parent = $parent->getParent();
                }
                
                return $parent;
                
            }
            
            return $page;
            
        }
    }
391642
public function getCollectionChildren()
    {
        $children = [];
        $db = Database::connection();
        $q = 'select cID from Pages where cParentID = ? and cIsTemplate = 0 order by cDisplayOrder asc';
        $r = $db->executeQuery($q, [$this->getCollectionID()]);
        if ($r) {
            while ($row = $r->fetchRow()) {
                if ($row['cID'] > 0) {
                    $c = self::getByID($row['cID']);
                    $children[] = $c;
                }
            }
        }

        return $children;
    }
1038388
public function getPrevSibling()
    {
        // If parent and children are already loaded, avoid database query
        if($this->parent !== null && ($children = $this->parent->internalGetChildren()) !== null)
        {
            for($i=0; $i<count($children); $i++)
            {
                if($children[$i] == $this)
                {
                    return ($i-1 < 0) ? null : $children[$i-1];
                }
            }
        // @codeCoverageIgnoreStart
        }
        // @codeCoverageIgnoreEnd


        $qb = $this->getManager()->getConfiguration()->getBaseQueryBuilder();
        $alias = $this->getManager()->getConfiguration()->getQueryBuilderAlias();

        $qb->andWhere("$alias.".$this->getRightFieldName()." = :rgt1")
            ->setParameter('rgt1', $this->getLeftValue() - 1);
        if($this->hasManyRoots())
        {
            $qb->andWhere("$alias.".$this->getRootFieldName()." = :root")
                ->setParameter('root', $this->getRootValue());
        }

        $q = $qb->getQuery();
		if ($this->getManager()->getConfiguration()->isQueryHintSet()){
			$q = $this->getManager()->addHintToQuery($q);
		}
		$results = $q->getResult();

        if(!$results)
        {
            return null;
        }

        return $this->getManager()->wrapNode($results[0]);
    }
163625
public function getChildren()
    {
        return $this->owner
            ->hasMany($this->ownerClassName, [ $this->parentIdField => $this->primaryKey ])
            ->orderBy([
                "$this->tableName.$this->sortField" => SORT_ASC,
                "$this->tableName.$this->primaryKey" => SORT_ASC,
            ]);
    }