Returns the pages that depend on this page. This includes virtual pages, pages that link to it, etc.

@param bool $includeVirtuals Set to false to exlcude virtual pages.
@return ArrayList|SiteTree[]
968372
public function DependentPages($includeVirtuals = true)
    {
        if (class_exists(Subsite::class)) {
            $origDisableSubsiteFilter = Subsite::$disable_subsite_filter;
            Subsite::disable_subsite_filter(true);
        }

        // Content links
        $items = ArrayList::create();

        // If the record hasn't been written yet, it cannot be depended on yet
        if (!$this->isInDB()) {
            return $items;
        }

        // We merge all into a regular SS_List, because DataList doesn't support merge
        if ($contentLinks = $this->BackLinkTracking()) {
            $items->merge($contentLinks);
        }

        // Virtual pages
        if ($includeVirtuals) {
            $virtuals = $this->VirtualPages()
                ->alterDataQuery(function ($query) {
                    $query->selectField("'Virtual page'", "DependentLinkType");
                });
            $items->merge($virtuals);
        }

        // Redirector pages
        $redirectors = RedirectorPage::get()->where(array(
                '"RedirectorPage"."RedirectionType"' => 'Internal',
                '"RedirectorPage"."LinkToID"' => $this->ID
            ))->alterDataQuery(function ($query) {
                $query->selectField("'Redirector page'", "DependentLinkType");
            });
        $items->merge($redirectors);

        if (class_exists(Subsite::class)) {
            Subsite::disable_subsite_filter($origDisableSubsiteFilter);
        }

        return $items;
    }
196506
protected function getSpecialPageList() {
        $siteId = $this->contextManager->getSiteId();
        $language = $this->contextManager->getSiteDefaultLanguage();
        $specialPages = $this->nodeRepository->findAllSpecialPage($language, $siteId);

        $specialPageChoice = array();
        foreach ($specialPages as $node) {
            $specialPageChoice[$node->getId()] = $node->getSpecialPageName();
        }

        return $specialPageChoice;
    }
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;
    }
908509
protected function getPages()
    {
        $pages = $this->pages;
        ksort($pages);
        $pages = array_values($pages);

        return $pages;
    }
1082037
@Override
    public List<String> getVirtualHosts() {
        if (null == this.vhostArray) {
            // nothing here but the api says it returns a non-null empty list
            this.vhostArray = new ArrayList<String>(0);
        }
        return this.vhostArray;
    }
137625
public function extra_admin_pages( $admin_pages ) {
		$extra_admin_pages = [];
		foreach ( array_keys( self::$remote_management ) as $key ) {
			if ( ! empty( self::$options_remote[ $key ] ) ) {
				$extra_admin_pages = [ 'index.php' ];
				break;
			}
		}

		return array_merge( $admin_pages, $extra_admin_pages );
	}
405370
private function findActivePageTiers()
    {
        // if selected page has a parent
        // find all pages with same parent id
        // if more than 1 - valid
        // if less than 1 - return 'about us'

        $name = 'About Us';
        $items = collect();
        if ($this->page->parent_id > 0) {
            $rows = Page::where('parent_id', $this->page->parent_id)
                ->orderBy('header_order')
                ->get();

            if ($items->count() > 1) {
                $items = $rows;
                $name = $this->page->parent->name;
            }
        }

        return (object) [
            'name'  => $name,
            'items' => $items,
        ];
    }
818389
public function getTreeIds($includeSelf = true, $includeParents = false)
    {
        if ( $includeParents ) {
            return array_merge($this->getParentsId(), $this->getChildrenId($includeSelf));
        } else {
            return $this->getChildrenId($includeSelf);
        }
    }
1139750
public function getFetchRelationships($andRelationshipEntities = false)
    {
        $rels = [];
        foreach ($this->relationships as $relationship) {
            if ($relationship->isFetch() && !$relationship->isRelationshipEntity()) {
                $rels[] = $relationship;
            }
        }

        return $rels;
    }
1245238
protected function getIncludes($includes)
    {
        if ($includes === null) {
            return [];
        }

        $fractal = app(Manager::class);

        return $fractal->parseIncludes($includes)->getRequestedIncludes();
    }
786822
public function allSitePagesAction()
    {
        $entityMgr = $this->getServiceLocator()->get(
            'Doctrine\ORM\EntityManager'
        );
        $currentSite = $this->getServiceLocator()->get(
            \Rcm\Service\CurrentSite::class
        );
        $siteId = $currentSite->getSiteId();

        /** @var Site $site */
        $site = $entityMgr->getRepository(
            Site::class
        )->findOneBy(
            [
                'siteId' => $siteId
            ]
        );

        $pages = $site->getPages();

        $uriFormat = $this->params()->fromQuery('format', null);

        $return = [];

        /** @var Page $page */
        foreach ($pages as $page) {
            $pageName = $page->getName();
            $pageUrl = $this->urlToPage($pageName, $page->getPageType());

            if (!empty($uriFormat)
                && $uriFormat == 'tinyMceLinkList'
            ) {
                $return[] = [
                    'title' => $pageUrl,
                    'value' => $pageUrl
                ];
            } else {
                $return[$pageUrl] = $pageName;
            }
        }
        asort($return);

        return new JsonModel($return);
    }
1029553
public function findAll()
    {
        $virtualHostNodes = array();
        foreach ($this->getSystemConfiguration()->getContainers() as $containerNodes) {
            foreach ($containerNodes->getServers() as $serverNode) {
                foreach ($serverNode->getVirtualHosts() as $virtualHostNode) {
                    $virtualHostNodes[$virtualHostNode->getPrimaryKey()] = $virtualHostNode;
                }
            }
        }
        return $virtualHostNodes;
    }
910508
public static function getBundles(): array
    {
        // Dependencies
        return [
            // Required by SidusEAVBootstrapBundle
            new \Mopa\Bundle\BootstrapBundle\MopaBootstrapBundle(),
            // Required by SidusFilterBundle
            new \WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
            // Required by SidusEAVBootstrapBundle
            new \Pinano\Select2Bundle\PinanoSelect2Bundle(),
            // Required by SidusFileUploadBundle
            new \Oneup\UploaderBundle\OneupUploaderBundle(),
            // Required by SidusFileUploadBundle
            new \Oneup\FlysystemBundle\OneupFlysystemBundle(),

            // Sidus bundles
            // Base bundle containing many dependencies
            new \Sidus\BaseBundle\SidusBaseBundle(),
            // Base bundle for EAV model
            new \Sidus\EAVModelBundle\SidusEAVModelBundle(),
            // Data filtering based on user input
            new \Sidus\FilterBundle\SidusFilterBundle(),
            // Data filtering with EAV support
            new \Sidus\EAVFilterBundle\SidusEAVFilterBundle(),
            // Bootstrap integration + additional EAV components
            new \Sidus\EAVBootstrapBundle\SidusEAVBootstrapBundle(),
            // DataGrid made easy
            new \Sidus\DataGridBundle\SidusDataGridBundle(),
            // Easily attach file to doctrine's entities
            new \Sidus\FileUploadBundle\SidusFileUploadBundle(),
            // Very basic admin configuration in YML to regroup entities and route actions easily
            new \Sidus\AdminBundle\SidusAdminBundle(),

            // Additionnal Bundles
            // TinyMCE WYSIWYG integration
            new \Stfalcon\Bundle\TinymceBundle\StfalconTinymceBundle(),
            // JS routing needed for TinyMCE extensions
            new \FOS\JsRoutingBundle\FOSJsRoutingBundle(),
            // Automatic image resizing
            new \Liip\ImagineBundle\LiipImagineBundle(),
            // Default cache system
            new \Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),

            // Clever Process Bundle
            new \CleverAge\ProcessBundle\CleverAgeProcessBundle(),

            // Simple permission management
            new \CleverAge\PermissionBundle\CleverAgePermissionBundle(),

            // CleverAge EAVManager
            new \CleverAge\EAVManager\EAVModelBundle\CleverAgeEAVManagerEAVModelBundle(),
            new \CleverAge\EAVManager\LayoutBundle\CleverAgeEAVManagerLayoutBundle(),
            new \CleverAge\EAVManager\AdminBundle\CleverAgeEAVManagerAdminBundle(),
            new \CleverAge\EAVManager\UserBundle\CleverAgeEAVManagerUserBundle(),
            new \CleverAge\EAVManager\SecurityBundle\CleverAgeEAVManagerSecurityBundle(),
            new \CleverAge\EAVManager\AssetBundle\CleverAgeEAVManagerAssetBundle(),
            new \CleverAge\EAVManager\ProcessBundle\CleverAgeEAVManagerProcessBundle(),

            // ApiPlatformBundle support for EAV manager
            new \CleverAge\EAVManager\ApiPlatformBundle\CleverAgeEAVManagerApiPlatformBundle(),
        ];
    }
58068
public function sourceRecords($params = [])
    {
        if (class_exists(Subsite::class) && Subsite::get()->count() > 0) {
            $origMode = Versioned::get_reading_mode();
            Versioned::set_reading_mode('Stage.Stage');
            $items = [
                'Pages' => Subsite::get_from_all_subsites(SiteTree::class),
                'Files' => Subsite::get_from_all_subsites(File::class),
            ];

            if (array_key_exists('AllSubsites', $params)) {
                $items['Pages'] = $items['Pages']->filter(['SubsiteID' => $params['AllSubsites']]);
                $items['Files'] = $items['Files']->filter(['SubsiteID' => [0, $params['AllSubsites']]]);
            }
            Versioned::set_reading_mode($origMode);

            return $items;
        }

        return [
            'Pages' => Versioned::get_by_stage(SiteTree::class, 'Stage'),
            'Files' => File::get(),
        ];
    }
22333
public function Pages()
    {
        $pages = SiteTree::get();
        $types = $this->PageTypes->getValue();
        if (count($types)) {
            $pages = $pages->filter('ClassName', $types);
        }

        $parents = $this->PageParents()->column('ID');
        if (count($parents)) {
            $pages = $pages->filter('ParentID', $parents);
        }

        return $pages;
    }
1147697
public function getAncestors($include_parent = false)
    {
        $ancestors = ArrayList::create();
        $object    = $this->Categories()->first();

        if($object) {
            if($include_parent) $ancestors->push($object);

            while ($object = $object->getParent()) {
                $ancestors->push($object);
            }
        }

        $this->extend('updateAncestors', $ancestors, $include_parent);

        return $ancestors;
    }
1180916
public function otherModules(bool $include_disabled = false): Collection
    {
        return $this->findByInterface(ModuleInterface::class, $include_disabled, true)
            ->filter(static function (ModuleInterface $module): bool {
                foreach (self::COMPONENTS as $interface) {
                    if ($module instanceof $interface) {
                        return false;
                    }
                }

                return true;
            });
    }