Return array with page for post type Ids
@return array
434718
protected function get_page_ids()
    {
        $page_ids = array();

        foreach (get_post_types(array(), 'objects') as $post_type) {
            if (! $post_type->has_archive) {
                continue;
            }

            if (! get_option("page_for_{$post_type->name}")) {
                continue;
            }

            $page_ids[$post_type->name] = get_option("page_for_{$post_type->name}");
        }

        return $page_ids;
    }
759750
protected function getPidList(): array
    {
        $rootPIDs = explode(',', $this->settings['pages']);
        $pidList = $rootPIDs;

        // iterate through root-page ids and merge to array
        foreach ($rootPIDs as $pid) {
            $result = $this->queryGenerator->getTreeList($pid, $this->settings['recursive'], 0, 1);
            if ($result) {
                $subtreePids = explode(',', $result);
                $pidList = array_merge($pidList, $subtreePids);
            }
        }
        return $pidList;
    }
839064
public function getPages(): array
    {
        if ($this->_pages !== null) {
            return $this->_pages;
        }

        $this->_pages = [];
        $pages = explode('<!--pagebreak-->', (string)$this);

        foreach ($pages as $page) {
            $this->_pages[] = new \Twig_Markup($page, Craft::$app->charset);
        }

        return $this->_pages;
    }
1076019
public static function getPageTypeBlacklist()
    {
        $ret = self::$pagetypeBlacklist;

        // Fetch from SetupTS (comma separated list)
        if (isset($GLOBALS['TSFE']->tmpl->setup['plugin.']['metaseo.']['sitemap.']['index.']['pageTypeBlacklist'])
            && strlen(
                $GLOBALS['TSFE']
                    ->tmpl
                    ->setup['plugin.']['metaseo.']['sitemap.']['index.']['pageTypeBlacklist']
            ) >= 1
        ) {
            $pageTypeBlacklist = $GLOBALS['TSFE']->tmpl
                                     ->setup['plugin.']['metaseo.']['sitemap.']['index.']['pageTypeBlacklist'];
            $pageTypeBlacklist = Typo3GeneralUtility::trimExplode(',', $pageTypeBlacklist);

            $ret = array_merge($ret, $pageTypeBlacklist);
        }

        return $ret;
    }
1245046
public static function posts()
    {
        if (!getConfig('sitemap.posts')) {
            return [];
        }

        $table = TableRegistry::get('MeCms.PostsCategories');
        $url = Cache::read('sitemap', $table->getCacheName());

        if (!$url) {
            $alias = $table->Posts->getAlias();
            $categories = $table->find('active')
                ->select(['id', 'lft', 'slug'])
                ->contain($alias, function (Query $q) use ($alias) {
                    return $q->find('active')
                        ->select(['category_id', 'slug', 'modified'])
                        ->order([sprintf('%s.modified', $alias) => 'DESC']);
                })
                ->order(['lft' => 'ASC']);

            if ($categories->isEmpty()) {
                return [];
            }

            $latest = $table->Posts->find('active')
                ->select(['modified'])
                ->order([sprintf('%s.modified', $alias) => 'DESC'])
                ->firstOrFail();

            //Adds posts index, categories index and posts search
            $url[] = self::parse(['_name' => 'posts'], ['lastmod' => $latest->modified]);
            $url[] = self::parse(['_name' => 'postsCategories']);
            $url[] = self::parse(['_name' => 'postsSearch'], ['priority' => '0.2']);

            foreach ($categories as $category) {
                //Adds the category
                $url[] = self::parse(
                    ['_name' => 'postsCategory', $category->slug],
                    ['lastmod' => array_value_first($category->posts)->modified]
                );

                //Adds each post
                foreach ($category->posts as $post) {
                    $url[] = self::parse(['_name' => 'post', $post->slug], ['lastmod' => $post->modified]);
                }
            }

            Cache::write('sitemap', $url, $table->getCacheName());
        }

        return $url;
    }
1217155
public function getAnchors()
    {
        $list = ArrayList::create();
        
        if ($page = $this->getCurrentPage(Page::class)) {
            
            $html = HTMLValue::create($page->Content);
            
            $anchors = $html->query("//*[@id]");
            
            foreach ($anchors as $anchor) {
                
                $list->push(
                    ArrayData::create([
                        'Link' => $page->Link(sprintf('#%s', $anchor->getAttribute('id'))),
                        'Text' => $anchor->textContent
                    ])
                );
                
            }
            
        }
        
        return $list;
    }
1295833
public function getValuesByPage(): array
    {
        $result = array();

        foreach ($this->_definition as $key => $value) {
            $page = $this->getFieldProperty($key, 'page');

            if ($page) {
                $result[$page][$key] = $this->$key;
            }
        }

        return $result;
    }
948061
protected function getPageArray()
    {
        $range = \range($this->firstPage, $this->lastPage);
        $pageArray = [];

        foreach ($range as $page) {
            $pageArray[] = [
                'page' => $page,
                'label' => $page,
                'type' => 'page'
            ];
        }

        return $pageArray;
    }
391673
private function get_tags( $post_id ) {
		$tag_data = get_the_tags( $post_id );
		$tag_arr  = [];
		if ( $tag_data ) {
			foreach ( $tag_data as $tag ) {
				array_push( $tag_arr, $tag->slug );
			}
		}

		return $tag_arr;
	}
655320
public static function fetchAllPagesPageTypes()
    {
        $types = Symphony::Database()->fetch("SELECT `page_id`,`type` FROM `tbl_pages_types`");
        $page_types = array();

        if (is_array($types)) {
            foreach ($types as $type) {
                $page_types[$type['page_id']][] = $type['type'];
            }
        }

        return $page_types;
    }
77660
protected function getPageLinksArray()
    {
        $links = [];
        $types = $this->getPageLinkTypes();

        $links[] = ['name' => Lang::get('backend::lang.pagelist.select_page'), 'url' => false];

        $iterator = function ($links, $level = 0) use (&$iterator) {
            $result = [];
            foreach ($links as $linkUrl => $link) {

                /*
                 * Remove scheme and host from URL
                 */
                $baseUrl = Request::getSchemeAndHttpHost();
                if (strpos($linkUrl, $baseUrl) === 0) {
                    $linkUrl = substr($linkUrl, strlen($baseUrl));
                }

                $linkName = str_repeat('&nbsp;', $level * 4);
                $linkName .= is_array($link) ? array_get($link, 'title', '') : $link;
                $result[] = ['name' => $linkName, 'url' => $linkUrl];

                if (is_array($link)) {
                    $result = array_merge(
                        $result,
                        $iterator(array_get($link, 'links', []), $level + 1)
                    );
                }
            }

            return $result;
        };

        foreach ($types as $typeCode => $typeName) {
            $links = array_merge($links, $iterator($this->getPageLinks($typeCode)));
        }

        return $links;
    }
448302
protected function getIDListFromDB() : array
    {
        //Get product ID list
        $arProductIDList = (array) Product::active()->lists('id');
        if (empty($arProductIDList)) {
            return [];
        }

        //Check active offers
        if (Settings::getValue('check_offer_active')) {
            //Get product list with active offers
            $arProductIDListWithOffers = (array) Offer::active()->groupBy('product_id')->lists('product_id');
            if (empty($arProductIDListWithOffers)) {
                return [];
            }

            $arProductIDList = array_intersect($arProductIDList, $arProductIDListWithOffers);
        }

        return $arProductIDList;
    }
595837
public function many( array $ids = [] ) {
        if( count( $ids ) === 0 ) {
            return [];
        }

        $pages = array_chunk( $ids, $this->maxPageSize() );

        $requests = [];
        foreach( $pages as $page ) {
            $requests[] = [ 'ids' => implode( ',', $page ) ];
        }

        $responses = $this->requestMany( $requests );

        $result = [];
        foreach( $responses as $response ) {
            $result = array_merge( $result, $response->json() );
        }

        return $result;
    }
409901
public static function get_post_types() {
		$param     = array(
			'_builtin' => false,
			'public'   => true,
		);
		$post_type = get_post_types( $param );

		return array_filter( $post_type, array( __CLASS__, 'is_rewrite_supported_by' ) );

	}
1091242
public function toArray()
  {
    return [
      'current_page' => $this->current_page,
      'data' => $this->data,
      'first_page_url' => $this->first_page_url,
      'prev_page_url' => $this->prev_page_url,
      'next_page_url' => $this->next_page_url,
      'last_page_url' => $this->last_page_url,
      'per_page' => $this->per_page,
      'total' => $this->total
    ];
  }
67874
public function getIds()
    {
        if (!$this->_extendedBackend) {
            Zend_Cache::throwException(self::BACKEND_NOT_IMPLEMENTS_EXTENDED_IF);
        }

        $ids = $this->_backend->getIds();

        // we need to remove cache_id_prefix from ids (see #ZF-6178, #ZF-7600)
        if (isset($this->_options['cache_id_prefix']) && $this->_options['cache_id_prefix'] !== '') {
            $prefix    = & $this->_options['cache_id_prefix'];
            $prefixLen = strlen($prefix);
            foreach ($ids as &$id) {
                if (strpos($id, $prefix) === 0) {
                    $id = substr($id, $prefixLen);
                }
            }
        }

        return $ids;
    }
331436
public static function getPaginationData()
    {
        global $wp_query;

        $data = array();

        $data['postType'] = $wp_query->query['post_type'];
        $data['postCount'] = $wp_query->post_count;
        $data['postTotal'] = $wp_query->found_posts;
        $data['pageIndex'] = ($wp_query->query['paged']) ? intval($wp_query->query['paged']) : 1;
        $data['pageTotal'] = $wp_query->max_num_pages;

        return $data;
    }