@param String $pageName
Returns a list of categories this page is a member of.
Results will include hidden categories

@return array \Title
489860
public static function getCategories($pageName) {
	    $title = Title::newFromText ( $pageName );
	    $page = new Article($title);
	    $categoriesIterator = $page->getPage()->getCategories();

	    $categories = array();
	    foreach ($categoriesIterator as $categoryTitle) {
	        $categories[] = $categoryTitle;
	    }
	    return $categories;
	}
258521
public function getSectionComponents($sectionName)
    {
        return $this->getComponents()->filter(
            function (ComponentInterface $component) use ($sectionName) {
                return $component instanceof RenderableComponentInterface
                && $component->getRenderSection() === $sectionName;
            }
        );
    }
178450
public function getPagination($className='CPagination')
	{
		if($this->_pagination===null)
		{
			$this->_pagination=new $className;
			if(($id=$this->getId())!='')
				$this->_pagination->pageVar=$id.'_page';
		}
		return $this->_pagination;
	}
826538
public function setPageName($title)
    {
        $this->oldTitle = $this->pageName;
        $this->pageName = $title;

        if ($this->pageName && $this->getContentRoute()) {
            $this->getContentRoute()->setName($this->pageName);
        }

        return $this;
    }
923034
public function getPageTitle()
    {
        $titleParts = [];
        $titleParts[] = $this->getTitlePrefix();
        $titleParts[] = $this->getTitle();
        $titleParts[] = $this->getTitleSuffix();
        $titleParts[] = $this->getTitlePageSuffix();

        $titleParts = array_filter($titleParts);

        return implode(' | ', $titleParts);
    }
1360062
public function getRequestNames($domainName, $sectionName, $categoryName): array
    {
        return $this->getBasenames($this->getRequests($domainName, $sectionName, $categoryName), '.php');
    }
76494
public function listTableColumns(string $tableName) : array
    {
        $tableName = $this->tableMaybeInvalid($tableName);
        return $this
            ->getSchemaManager()
            ->listTableColumns($tableName);
    }
1059556
public static function pageTitle() {
    $short_site_name = Config::get()->site_name;
    $separator = self::pageTitleSeparator();
    $title = wp_title(null, false);
    
    // From an SEO/SEM perspective, appending the site name to the title is
    // superfluous if the title already contains some form of the site name, as
    // may be the case with press releases and other news-related posts
    $title_has_site_name = (strpos($title, $short_site_name) !== false);
    if(!empty($title) && $title_has_site_name) {
      return $title;
    }
    
    $site_name = get_bloginfo('name');
    if(!empty($title)) {
      return $title.$separator.$site_name;
    }
    
    global $post;
    $this_post = $post;
    
    // Create Taco post only if $post is not already a Taco object
    if(!is_subclass_of($post, 'Taco\Base')) {
      $this_post = \Taco\Post\Factory::create($post);
    }
    
    $page_title_taxonomy = $this_post->pageTitleTaxonomy();
    
    if(Config::get()->use_yoast) {
      $yoast_title = $this_post->getSafe('_yoast_wpseo_title');
      $yoast_title_has_site_name = preg_match('/'.$site_name.'$/', $yoast_title);
      if(!empty($yoast_title) && $yoast_title_has_site_name) {
        return $yoast_title;
      }
      
      if(!empty($yoast_title)) {
        return $yoast_title.$separator.$site_name;
      }
    }
    
    if(empty($page_title_taxonomy)) {
      return $this_post->getTheTitle().$separator.$site_name;
    }
    
    $term_name = null;
    $terms = $this_post->getTerms($page_title_taxonomy);
    if(!empty($terms)) {
      $primary_term_id = $this_post->{'_yoast_wpseo_primary_'.$page_title_taxonomy};
      $term = (!empty($primary_term_id))
        ? $terms[$primary_term_id]
        : reset($terms);
      $term_name = $separator.$term->name;
    }
    return $this_post->getTheTitle().$term_name.$separator.$site_name;
  }
1294722
public function DisplayPostsByCategory($title)
    {
        // Get the category
        // Please note that the categories table does *NOT* have a "slug" field!
        $category = $this->repository->findCategoryIdByTitle($title);

        // if category does not exist
        if (count($category) < 1 ) {
            return redirect('home');
        }


        // Process the category's image

        // (i) resize the category image
        $this->imagesHelper->createCategoryResizedImageFiles($category->featured_image);

        // (ii) what is the name of the resized category image that the view will use?
        //      yeah, do this second as about to change $category->featured_image
        $category->featured_image = $this->imagesHelper->getCategoryFeaturedImage($category->featured_image);

        // Get the posts associated with this category
        $posts = $this->repository->findEnabledAllPostsThatHaveCategoryId($category->id);

        if (count($posts) == 0)
        {
            // There are no enabled posts publish_on =< today
            //return view('errors/404');
            return redirect('home');
        }

        // Is the featured image in each post resized?
        $this->checkPostsImagesResized($posts);

        return view('categories/list_posts_associated_with_category', [
            'category'          => $category,
            'posts'             => $posts,
            'pagetitle'         => $category->title,
            'DatesHelper'       => DatesHelper::class,
            'HTMLHelper'        => HTMLHelper::class,
            'ImagesHelper'      => $this->imagesHelper,
        ]);
    }
93410
public function pageTitle($appends = '')
    {
        // Get crumbs titles
        $crumbs = array_map(function ($crumb) {
            return $crumb->title;
        }, $this->crumbs);

        // Reverse array elements order
        $crumbs = array_reverse($crumbs);
        $title  = implode($this->config->get('crumbs.page_title_separator'), $crumbs);

        return $title . ($title ? $appends : '');
    }
255064
public function display($pageConfig, $title = null)
    {
        $navs = (array) wei()->cache->get($this->getRenderCacheKey(), 86400, function () {
            return $this->getCacheData();
        });

        foreach ($navs as $nav) {
            if (!$pageConfig['display' . ucfirst($nav['type'])]) {
                continue;
            }
            $this->event->trigger('navRender' . ucfirst($nav['type']), [$nav, $title]);
        }
    }
267198
protected static function getCategoryPageUrl($pageCode, $category, $theme)
    {
        $page = CmsPage::loadCached($theme, $pageCode);
        if (!$page) {
            return;
        }

        $properties = $page->getComponentProperties('blogPosts');
        if (!isset($properties['categoryFilter'])) {
            return;
        }

        /*
         * Extract the routing parameter name from the category filter
         * eg: {{ :someRouteParam }}
         */
        if (!preg_match('/^\{\{([^\}]+)\}\}$/', $properties['categoryFilter'], $matches)) {
            return;
        }

        $paramName = substr(trim($matches[1]), 1);
        $url = CmsPage::url($page->getBaseFileName(), [$paramName => $category->slug]);

        return $url;
    }
1300832
public function get($pageName)
    {
        $ds = DIRECTORY_SEPARATOR;
        $path = app_path().$ds.'lablog'.$ds.$pageName.'.page';

        $pageContent = $this->fs->get($path);

        $page = $this->config->strip($pageContent, '{PAGECONFIG}');

        $pageObject = new Page;
        $pageObject->name = $pageName;
        $pageObject->modified = $this->modified($path);
        $pageObject->content = $this->processor->process($page['content']);
        $pageObject->config = $page['config'];
        $pageObject->slug = $pageName;
        $pageObject->url = \URL::to(\Config::get('lablog::config.prefix').'/'.$pageName);

        return $pageObject;
    }
416251
public function title(string $title = null): Htmlable
    {
        $page = Paginator::resolveCurrentPage();

        $data = [
            'site' => ['name' => $this->site],
            'page' => ['title' => $title, 'number' => $page],
        ];

        $data['site']['name'] = $this->getHtmlTitleFormatForSite($data);

        $output = $this->getHtmlTitleFormatForPage($data);

        return $this->html->create('title', trim($output));
    }
589008
public function getPageTitle()
    {
        $page = $GLOBALS['TSFE'];

        if ($page->indexedDocTitle) {
            $pageTitle = $page->indexedDocTitle;
        } elseif ($page->altPageTitle) {
            $pageTitle = $page->altPageTitle;
        } else {
            $pageTitle = $page->page['title'];
        }

        return $pageTitle;
    }
1346108
public function pageHeader($title)
    {
        if (is_category()) {
            return single_cat_title('', false);
        } elseif (is_tag()) {
            return single_cat_title('', false);
        } elseif (is_author()) {
            $title = '<span class="vcard">' . get_the_author() . '</span>';
        } elseif (is_year()) {
            return get_the_date(_x('Y', 'yearly archives date format'));
        } elseif (is_month()) {
            return get_the_date(_x('F Y', 'monthly archives date format'));
        } elseif (is_day()) {
            return get_the_date(_x('F j, Y', 'daily archives date format'));
        } elseif (is_post_type_archive()) {
            return post_type_archive_title('', false);
        }
        return $title;
    }
426479
public function fetchPage($pageName)
    {
        $pageName = (string) $pageName;

        if (!array_key_exists($pageName, $this->pages))
        {
            if ('' == $pageName)
            {
                $page = ContentPageQuery::create()
                    ->filterByIsPublished(true)
                    ->filterByName(null, Criteria::ISNULL)
                    ->_or()
                    ->filterByName('')
                    ->findOne()
                ;
            }
            else
            {
                $page = ContentPageQuery::create()
                    ->filterByIsPublished(true)
                    ->filterByName($pageName)
                    ->findOne()
                ;
            }

            $this->pages[$pageName] = $page;
        }

        return $this->pages[$pageName];
    }