public function update($pageId)
    {
        // get the root line of the page, every parent page could be a Mount Page source
        /** @var $pageSelect PageRepository */
        $pageSelect = GeneralUtility::makeInstance(PageRepository::class);
        $rootLineArray = $pageSelect->getRootLine($pageId);

        $currentPage = array_shift($rootLineArray);
        $currentPageUid = (int)$currentPage['uid'];

        if (empty($rootLineArray) && $currentPageUid === 0) {
            return;
        }

        /** @var $rootLine Rootline */
        $rootLine = GeneralUtility::makeInstance(Rootline::class, /** @scrutinizer ignore-type */ $rootLineArray);
        $rootLineParentPageIds = array_map('intval', $rootLine->getParentPageIds());
        $destinationMountProperties = $this->pagesRepository->findMountPointPropertiesByPageIdOrByRootLineParentPageIds($currentPageUid, $rootLineParentPageIds);

        if (empty($destinationMountProperties)) {
            return;
        }

        foreach ($destinationMountProperties as $destinationMount) {
            $this->addPageToMountingSiteIndexQueue($pageId, $destinationMount);
        }
    }
public function update($pageId)
    {
        // get the root line of the page, every parent page could be a Mount Page source
        /** @var $pageSelect PageRepository */
        $pageSelect = GeneralUtility::makeInstance(PageRepository::class);
        $rootLineArray = $pageSelect->getRootLine($pageId);

        $currentPage = array_shift($rootLineArray);
        $currentPageUid = (int)$currentPage['uid'];

        if (empty($rootLineArray) && $currentPageUid === 0) {
            return;
        }

        /** @var $rootLine Rootline */
        $rootLine = GeneralUtility::makeInstance(Rootline::class, /** @scrutinizer ignore-type */ $rootLineArray);
        $rootLineParentPageIds = array_map('intval', $rootLine->getParentPageIds());
        $destinationMountProperties = $this->pagesRepository->findMountPointPropertiesByPageIdOrByRootLineParentPageIds($currentPageUid, $rootLineParentPageIds);

        if (empty($destinationMountProperties)) {
            return;
        }

        foreach ($destinationMountProperties as $destinationMount) {
            $this->addPageToMountingSiteIndexQueue($pageId, $destinationMount);
        }
    }
public function update ( $ pageId ) { // get the root line of the page, every parent page could be a Mount Page source /** @var $pageSelect PageRepository */ $ pageSelect = GeneralUtility :: makeInstance ( PageRepository :: class ) ; $ rootLineArray = $ pageSelect -> getRootLine ( $ pageId ) ; $ currentPage = array_shift ( $ rootLineArray ) ; $ currentPageUid = ( int ) $ currentPage [ 'uid' ] ; if ( empty ( $ rootLineArray ) && $ currentPageUid === 0 ) { return ; } /** @var $rootLine Rootline */ $ rootLine = GeneralUtility :: makeInstance ( Rootline :: class , /** @scrutinizer ignore-type */ $ rootLineArray ) ; $ rootLineParentPageIds = array_map ( 'intval' , $ rootLine -> getParentPageIds ( ) ) ; $ destinationMountProperties = $ this -> pagesRepository -> findMountPointPropertiesByPageIdOrByRootLineParentPageIds ( $ currentPageUid , $ rootLineParentPageIds ) ; if ( empty ( $ destinationMountProperties ) ) { return ; } foreach ( $ destinationMountProperties as $ destinationMount ) { $ this -> addPageToMountingSiteIndexQueue ( $ pageId , $ destinationMount ) ; } }
Handles updates of the Index Queue in case a newly created or changed
page is part of a tree that is mounted into a another site.

@param int $pageId Page Id (uid).
Handles updates of the Index Queue in case a newly created or changed page is part of a tree that is mounted into a another site .