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;
    }
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;
    }
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 ; }
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[]
Returns the pages that depend on this page . This includes virtual pages pages that link to it etc .