Return direct children of the page as PagePresenter instances

@return Collection
559980
public function presentChildren()
	{

		$childrenPages = new \WP_Query(
			array(
				'post_type'      => 'page',
				'post_parent'    => $this->ID,
				'post_status'    => 'publish',
				'orderby'        => 'menu_order',
				'order'          => 'ASC',
				'posts_per_page' => -1
			)
		);

		if (count($childrenPages->posts) == 0 || ! $childrenPages)
		{
			return null;
		}

		$pages = array();

		foreach ($childrenPages->posts as $p)
		{
			$pages[] = new self($p, false);
		}

		return Collection::make($pages);

	}
915527
public function getCollectionThemeObject()
    {
        if (!isset($this->themeObject)) {
            if ($this->vObj->pThemeID < 1) {
                $this->themeObject = PageTheme::getSiteTheme();
            } else {
                $this->themeObject = PageTheme::getByID($this->vObj->pThemeID);
            }
        }
        if (!$this->themeObject) {
            $this->themeObject = PageTheme::getSiteTheme();
        }

        return $this->themeObject;
    }
163230
protected function getChildrenList() {
        $query = (new Query)->from($this->itemChildTable);
        $parents = [];
        foreach ($query->all($this->db) as $row) {
            $parents[$row['parent']][] = $row['child'];
        }
        return $parents;
    }
152063
public function getAll()
    {
        $all   = [];
        $pages = $this->getPages();

        if ($this->getFirst() !== null) {
            $all[$this->getFirst()] = Pagination::FIRST;
        }

        if ($this->getLess() !== null) {
            $all[$this->getLess()] = Pagination::LESS;
        }

        foreach ($pages as $k => $page) {
            $all[$k] = $page;
        }

        if ($this->getMore() !== null) {
            $all[$this->getMore()] = Pagination::MORE;
        }

        if ($this->getLast() !== null) {
            $all[$this->getLast()] = Pagination::LAST;
        }

        ksort($all);

        return $all;
    }
313868
public function children()
    {
        $p = $this->_children();
        return $p ? new self($this->doc, $p) : null;
    }
960095
protected function getChildrenList()
    {
        $query = (new Query)
            ->select(['name', 'parents'])
            ->from($this->itemCollection);
        $children = [];
        foreach ($query->all($this->db) as $row) {
            if (!empty($row['parents'])) {
                foreach ($row['parents'] as $name) {
                    $children[$name][] = $row['name'];
                }
            }
        }
        return $children;
    }
1180754
public function showCollections()
    {
        // Get dependencies
        $collectionMapper = ($this->container->dataMapper)('CollectionMapper');
        $pageMapper = ($this->container->dataMapper)('PageMapper');

        // Fetch collection pages, and chuck pages into sub-array by collection ID with meta info
        $collectionPages = $pageMapper->findCollectionPages();
        foreach ($collectionPages as $col) {
            if (!isset($data['collectionPages'][$col->collection_id])) {
                $data['collectionPages'][$col->collection_id]['collection_id'] = $col->collection_id;
                $data['collectionPages'][$col->collection_id]['collection_title'] = $col->collection_title;
                $data['collectionPages'][$col->collection_id]['collection_slug'] = $col->collection_slug;
            }

            $data['collectionPages'][$col->collection_id]['pages'][] = $col;
        }

        // Get available templates and collection groups
        $data['templates'] = $this->getPageTemplates('collection');
        $data['collections'] = $collectionMapper->find();

        // Enrich collections array with matching description from templates array
        $templateArray = array_column($data['templates'], 'filename');
        array_walk($data['collections'], function (&$collect) use ($data, $templateArray) {
            // Find matching collection template key for reference in $templateArray
            $key = array_search($collect->definition, $templateArray);
            $collect->templateName = $data['templates'][$key]['name'];
            $collect->templateDescription = $data['templates'][$key]['description'];
        });

        return $this->render('collections.html', $data);
    }
598157
public function getPages()
    {
        $pages = array();

        foreach ($this->children as $child) {
            if ($child instanceof SwatNoteBookChild) {
                $pages = array_merge($pages, $child->getPages());
            }
        }

        return $pages;
    }
414618
public function getChildren()
    {
        $objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']);
        $children = [];
        foreach ($objs as $obj) {
            $obj['acl'] = $this->getChildACL();
            $children[] = new CalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
        }

        return $children;
    }
1316667
public function getParentPageOrRoot()
    {
        $page = $this->getPageOrRoot();
        if ($page->parent) {
            return $page->parent->getPageOrRoot();
        }
        return $page;
    }
958756
public function getChilds()
    {
        if (config('menus.ordering')) {
            return collect($this->childs)->sortBy(function ($child) {
                return $child->order;
            })->all();
        }

        return $this->childs;
    }
841096
public function getRequestedNodes()
    {
        $dh = $this->getSitemapDataProvider();
        $cParentID = 0;
        $parent = null;
        if ($this->request->query->has('cParentID')) {
            $cParentID = $this->request->query->get('cParentID');
        }
        if ($cParentID > 0) {
            $c = \Page::getByID($cParentID);
            $parent = \Page::getByID($c->getCollectionParentID());
        }

        if (is_object($parent) && !$parent->isError()) {
            $n = $dh->getNode($parent->getCollectionID());
            $n->icon = 'fa fa-angle-double-up';
            $n->expanded = true;
            $n->displaySingleLevel = true;

            $p = $dh->getNode($this->request->query->get('cParentID'));
            $p->expanded = true;
            $p->children = $dh->getSubNodes($this->request->query->get('cParentID'));
            $n->children = [$p];
            $nodes[] = $n;
        } else {
            if ($cParentID > 0) {
                $n = $dh->getNode($cParentID);
                $n->children = $dh->getSubNodes($this->request->query->get('cParentID'));
                $nodes[] = $n;
            } else {
                $nodes = $dh->getSubNodes($this->getRequestedSiteTree());
            }
        }

        return $nodes;
    }
237163
public function getPages()
    {
        $pages = [];

        foreach ($this->getLowers() as $lower) {
            $pages[$lower] = Pagination::LOWER;
        }

        if ($this->getCurrent()) {
            $pages[$this->getCurrent()] = Pagination::CURRENT;
        }

        foreach ($this->getHighers() as $higher) {
            $pages[$higher] = Pagination::HIGHER;
        }

        ksort($pages);

        return $pages;
    }
543866
def get_children(self):
        """"""
        key = self.CHILDREN_KEY % self.pk
        #children = cache.get(key, None)
        # if children is None:
        children = super(Page, self).get_children()
        #cache.set(key, children)
        return children
124316
protected function children()
    {
        if (($item = $this->getModel()) && method_exists($item, $this->name)) {
            return $item->{$this->name};
        }
    }
111310
protected function getChildrenUrls(BasePage $page)
    {
        $urls = [];

        $children = $page->getInstances();

        //parse the children
        foreach ($children as $child) {
            $url = $child->getUrl();
            $urls[] = $url;

            unset($url);
        }

        return $urls;
    }
1225220
public function getChildren()
    {
        $calendars = $this->caldavBackend->getCalendarsForUser($this->principalInfo['uri']);
        $objs = [];
        foreach ($calendars as $calendar) {
            if ($this->caldavBackend instanceof Backend\SharingSupport) {
                $objs[] = new SharedCalendar($this->caldavBackend, $calendar);
            } else {
                $objs[] = new Calendar($this->caldavBackend, $calendar);
            }
        }

        if ($this->caldavBackend instanceof Backend\SchedulingSupport) {
            $objs[] = new Schedule\Inbox($this->caldavBackend, $this->principalInfo['uri']);
            $objs[] = new Schedule\Outbox($this->principalInfo['uri']);
        }

        // We're adding a notifications node, if it's supported by the backend.
        if ($this->caldavBackend instanceof Backend\NotificationSupport) {
            $objs[] = new Notifications\Collection($this->caldavBackend, $this->principalInfo['uri']);
        }

        // If the backend supports subscriptions, we'll add those as well,
        if ($this->caldavBackend instanceof Backend\SubscriptionSupport) {
            foreach ($this->caldavBackend->getSubscriptionsForUser($this->principalInfo['uri']) as $subscription) {
                $objs[] = new Subscriptions\Subscription($this->caldavBackend, $subscription);
            }
        }

        return $objs;
    }