Retun an array of maps containing the keys, 'ID' and 'ParentID' for each page to be displayed
in the search.

@return SS_List
162812
public function getFilteredPages()
    {
        // Filter default records
        $pages = Versioned::get_by_stage(SiteTree::class, Versioned::DRAFT);
        $pages = $this->applyDefaultFilters($pages);
        return $pages;
    }
514560
static public function getMapParentId()
    {
        if (self::$_mapPrentId)
        {
            return self::$_mapPrentId;
        }
        
        $model = Cache::remember('map_tree', self::$lifeCache, function()
        {
            return DB::table('menus')->get();
        });
        
        $map = array();
        foreach ($model as $val)
        {
            $map[$val->parent_id][] = $val->id;
        }
        unset($val);
        
        self::$_mapPrentId = $map;
        return $map;
    }
893910
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllBraintreeGateways(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllBraintreeGateways();
        }
    }
528521
public function actionIndex($parent = null, $page = 1)
    {
        $searchModel = $this->module->model('ContentSearch');

        // list filter parameters correction
        $params = Yii::$app->request->queryParams;
        if ($parent === '-') { // to show all nodes
            $params['parent'] = $parent;
            unset($params[$searchModel->formName()]['parent_id']);
        } else {
            $params[$searchModel->formName()]['parent_id'] = $params['parent'] = intval($parent);
        }

        if (!Yii::$app->user->can('roleContentModerator') && Yii::$app->user->can('roleContentAuthor')) {
            $params[$searchModel->formName()]['owner_id'] = Yii::$app->user->id;
        }

        $dataProvider = $searchModel->search($params);

        $pager = $dataProvider->getPagination();
        $pager->pageSize = $this->pageSizeAdmin;
        $pager->totalCount = $dataProvider->getTotalCount();

        // page number correction:
        $maxPage = ceil($pager->totalCount / $pager->pageSize);
        if ($page > $maxPage) {
            $pager->page = $maxPage - 1;
        } else {
            $pager->page = $page - 1; //! from 0
        }

        return $this->render('index', compact('dataProvider', 'searchModel', 'params'));
    }
1358098
public function getRelatedPages()
    {
        $pages = ArrayList::create();

        foreach ($this->Sets() as $documentSet) {
            /** @var DocumentSet $documentSet */
            $pages->add($documentSet->Page());
        }
        $pages->removeDuplicates();

        $this->extend('updateRelatedPages', $pages);

        return $pages;
    }
557877
public function VirtualPages()
    {
        $pages = parent::VirtualPages();

        // Disable subsite filter for these pages
        if ($pages instanceof DataList) {
            return $pages->setDataQueryParam('Subsite.filter', false);
        }
        return $pages;
    }
35465
public List<CmsDetailPageInfo> getBestDetailPages() {

        List<CmsDetailPageInfo> result = new ArrayList<CmsDetailPageInfo>();
        for (String key : m_map.keySet()) {
            List<CmsDetailPageInfo> vals = m_map.get(key);
            if (!vals.isEmpty()) {
                result.add(vals.get(0));
            }
        }
        return result;

    }
1228974
public function getMenuPages( $ids, $map = false ) {

		if( count( $ids ) > 0 ) {

			$modelClass	= static::$modelClass;

			if( $map ) {

				$pages = $modelClass::find()->filterWhere( [ 'in', 'id', $ids ] )->all();

				$pageMap = [];

				foreach( $pages as $page ) {

					$pageMap[ $page->id ] = $page;
				}

				return $pageMap;
			}
			else {

				return $modelClass::find()->andFilterWhere( [ 'in', 'id', $ids ] )->all();
			}
		}

		return [];
	}
1267399
public function getAllSubpages($pageId)
    {
        $results = array();
        //Services
        $melisTree = $this->serviceLocator->get('MelisEngineTree');
        $pagePub   = $this->getServiceLocator()->get('MelisEngineTablePagePublished');
        $pageSave  = $this->getServiceLocator()->get('MelisEngineTablePageSaved');

        $pageSearchType = null;
        $pages = $melisTree->getPageChildren($pageId,2);
        
        
        if($pages)
        {
            $rpages = $pages->toArray();
            
            foreach ($rpages as $page)
            {
                $pageStat = $page['page_status'] ?? null;
                //if the page is published
                if($pageStat){
                    $pageData       = $pagePub->getEntryById($page['tree_page_id'])->current();
                    $pageSearchType = $pageData->page_search_type ?? null;
                }
                //if the page is unpublished
                else{
                    $pageData = $pageSave->getEntryById($page['tree_page_id'])->current();
                    //if the unpublishedData is not present in page_saved table
                    if(!$pageData){
                        //Get the pageData in page_published table
                        $pageData = $pagePub->getEntryById($page['tree_page_id'])->current();
                    }
                    $pageSearchType = $pageData->page_search_type ?? null;
                }

                $tmp = $this->formatPageInArray($page,$pageSearchType);
                $children = $this->getAllSubpages($page['tree_page_id'] ?? null);

                if (!empty($children))
                    $tmp['pages'] = $children;

                $results[] = $tmp;
            }
        }
        return $results;
    }
198528
protected function getMap(): array
    {
        $auth = $this->core->auth();
        $paths = [
            ['GET', '/sw.[i].js', function () {
                if (headers_sent() === false) {
                    header("Content-Type: application/javascript");
                }
                return file_get_contents(dirname(__DIR__) . "/files/sw.js");
            }],
            ['GET', '/offline', "Home@offline"],
        ];
        if ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/api/[**:link]?', "API"],
                ['GET', '/login', "Auth@showLogin", 'login-page'],
                ['GET', '/register', "Auth@showRegister", 'register-page'],
                ['GET', '/confirm', "Auth@confirm", 'confirm-page'],
                ['GET', '/forgot', "Auth@showForgot", 'forgot-page'],
                ['GET', '/reset/[a:reset_code]', "Auth@showReset", 'reset-page']
            ]);
        } else {
            $paths = array_merge($paths, [
                ['GET', '/api/[**:link]', "Auth@redirect"],
                ['GET', '/login', "Auth@redirect"],
                ['GET', '/register', "Auth@redirect"],
                ['GET', '/confirm', "Auth@confirm", 'confirm-page'],
                ['GET', '/forgot', "Auth@redirect"],
                ['GET', '/reset/[a:reset_code]', "Auth@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 5, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/', "User@showProfile", 'home-page'],
                ['GET', '/logout', "User@logout", 'logout-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/', "Home@redirect"],
                ['GET', '/logout', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 4, "max" => 4]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/users', "User@showList", 'users-list-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/users', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 4, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/pages/[i:page]?', "Page@showList", 'pages-list-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/pages/[i:page]?', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 3, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/pages/new', "Page@showNew", 'pages-new-page'],
                ['GET', '/pages/edit/[i:id]', "Page@showEdit", 'pages-edit-page'],
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/pages/new', "Home@redirect"],
                ['GET', '/pages/edit/[i:id]', "Home@redirect"],
            ]);
        }
        if ($auth->allow(["min" => 2, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/navigations', "Navigation@showNavigations", 'navigations-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/navigations', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 1, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/users/[i:page]?', "User@showList", 'users-list-page'],
                ['GET', '/users/new', "User@showNew", 'users-new-page'],
                ['GET', '/users/edit/[i:id]', "User@showEdit", 'users-edit-page'],
                ['GET', '/settings', "Site@showSettings", 'settings-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/users/[i:page]?', "Home@redirect"],
                ['GET', '/users/new', "Home@redirect"],
                ['GET', '/users/edit/[i:id]', "Home@redirect"],
                ['GET', '/settings', "Home@redirect"]
            ]);
        }
        return $paths;
    }
259329
public Map<Integer, String> getPageLinks() {

        Map<Integer, String> links = new TreeMap<Integer, String>();
        if (m_pageCount <= 1) {
            return links;
        }
        int startIndex, endIndex;
        String link = m_cms.getRequestContext().getUri() + m_parameters.toQueryString() + "&searchPage=";
        if (getDisplayPages() < 1) {
            // number of displayed pages not limited, build a map with all available page links
            startIndex = 1;
            endIndex = m_pageCount;
        } else {
            // limited number of displayed pages, calculate page range
            int currentPage = getSearchPage();
            int countBeforeCurrent = getDisplayPages() / 2;
            int countAfterCurrent;
            if ((currentPage - countBeforeCurrent) < 1) {
                // set count before to number of available pages
                countBeforeCurrent = currentPage - 1;
            }
            // set count after to number of remaining pages (- 1 for current page)
            countAfterCurrent = getDisplayPages() - countBeforeCurrent - 1;
            // calculate start and end index
            startIndex = currentPage - countBeforeCurrent;
            endIndex = currentPage + countAfterCurrent;
            // check end index
            if (endIndex > m_pageCount) {
                int delta = endIndex - m_pageCount;
                // decrease start index with delta to get the right number of displayed pages
                startIndex -= delta;
                // check start index to avoid values < 1
                if (startIndex < 1) {
                    startIndex = 1;
                }
                endIndex = m_pageCount;
            }
        }

        // build the sorted tree map of page links
        for (int i = startIndex; i <= endIndex; i++) {
            links.put(new Integer(i), (link + i));
        }
        return links;
    }
258251
public function getParentList(){
        if(!$this->isPropertyAvailable('ParentList')){
            $this->setProperty("ParentList", new SPList($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(), "parentlist")),false);
        }
        return $this->getProperty("ParentList");
    }
230014
public function getRelatedIds()
    {
        $fullKey = $this->relatedMap->getQualifiedKeyName();

        return $this->getQuery()->select($fullKey)->lists($this->relatedMap->getKeyName());
    }
348302
static public function getMapIdParent()
    {
        if (self::$_mapIdParent)
        {
            return self::$_mapIdParent;
        }

        $model = Cache::remember('map_tree', self::$lifeCache, function()
        {
            return DB::table('menus')->get();
        });

        $map = array();

        foreach ($model as $val)
        {
            $map[$val->id] = $val->parent_id;
        }
        unset($val);
        
        self::$_mapIdParent = $map;
       
        return $map;
    }
1164210
public function map()
    {
        $this->bind('seo_footer_uri', function ($uri) {
            return Footer::query()
                ->where('uri', $uri)
                ->where('locale', config('app.locale'))
                ->firstOrFail();
        });

        $this->group(config('arcanesoft.seo.widgets.footers.route', []), function () {
            $this->get('{seo_footer_uri}.html', 'FootersController@show')->name('show');
        });
    }
755063
public function parentPageListAction(Request $request)
    {
        $locale = $request->get('locale');
        $pages = [];
        $pageManager = $this->get('networking_init_cms.page_manager');

        if ($result = $pageManager->getParentPagesChoices($locale)) {
            foreach ($result as $page) {
                /* @var PageInterface $page */
                $pages[$page->getId()] = [$page->getAdminTitle()];
            }
        }

        return $this->renderJson($pages);
    }
891931
private function buildParentMap()
    {
        $map = [];

        foreach ($this->configurations as $configuration) {
            if (null !== $parentId = $configuration->getParentId()) {
                $map[$configuration->getResourceId()] = $parentId;
            }
        }

        ksort($map);

        return $map;
    }