Walks pages in the menu
@param  array $pages Pages to walk
@return void
323032
protected function walk($pages, $depth = 1, $classes = null)
    {
        $this->currentDepth = $depth;

        if ($this->args['sublevel']) {
            $this->startWrapper($classes, $depth === 1);
        }

        if (!is_array($pages)) {
            return;
        }

        foreach ($pages as $page) {
            $pageId = $this->getPageId($page);
            $attributes = array();
            $attributes['class'] = array();
            $output = true;

            if (is_numeric($page)) {
                $page = get_post($page);
            }

            if ($this->isAncestors($pageId)) {
                $attributes['class'][] = 'current-node current-menu-ancestor';

                if (count($this->getChildren($pageId)) > 0) {
                    $attributes['class'][] = 'is-expanded';
                }
            }

            if ($this->getPageId($this->currentPage) == $pageId) {
                $attributes['class'][] = 'current current-menu-item';
                if (count($this->getChildren($this->currentPage->ID)) > 0 && $depth != $this->args['depth']) {
                    $attributes['class'][] = 'is-expanded';
                }
            }

            if (($this->isAjaxParent && $depth === 1) || $depth < $this->args['start_depth']) {
                $output = false;
            }

            $this->item($page, $depth, $attributes, $output);
        }

        if ($this->args['sublevel']) {
            $this->endWrapper($depth === 1);
        }
    }
306648
public function check_page_access($page) {
        global $DB;

        if ($this->get_currentpage() != $page) {
            if ($this->get_navigation_method() == QUIZ_NAVMETHOD_SEQ && $this->get_currentpage() > $page) {
                return false;
            }
        }
        return true;
    }
1258456
protected function setPageCurrent($page)
    {

        // need both of these?
        $page += 0;
        $page = (int) $page;

        // cant be below 1
        $page = $page ? $page : 1;

        // cant be above possible
        if ($page > $this->possiblePages) {
            $page = $this->possiblePages;
        }

        $this->pageCurrent = $page;
    }
459407
public function setMenu(array $menu): void
	{
		$this->items = [];
		foreach ($menu as $namespace => $modules) {
			if (!empty($modules)) {
				$this->addMenu($modules, $namespace);
			}
		}
	}
192820
public function pushRouteCollection(array $routes)
    {
        foreach ($routes as $name => $route) {
            if (!array_key_exists('pattern', $route) || !array_key_exists('defaults', $route)) {
                $this->log('warning', sprintf('Unable to parse the route definition `%s`.', $name));
                continue;
            }

            $this->addRoute($name, $route);
        }

        $this->moveDefaultRoute();
    }
1057000
public function sortPages($pages)
    {
        usort($pages['_items'], function ($a, $b) {
            //need to convert them to lowercase strings for equal comparison
            return strcmp(strtolower($a["name"]), strtolower($b["name"]));
        });

        return $pages;
    }
183344
function set_page($page)
    {
        $this->list_page = (int)$page;
        $this->ldap->set_vlv_page($this->list_page, $this->page_size);
    }
437027
public function addPaths(array $paths)
    {
        $this->currentCollectorData = $this->filePathCollector->collect();

        foreach ($paths as $path) {
            $this->addPath($path);
        }
    }
503352
public function addRoutes($routes)
    {
        if (!is_array($routes) && !$routes instanceof Traversable) {
            throw new \Exception('Routes should be an array or an instance of Traversable');
        }
        foreach ($routes as $route) {
            call_user_func_array([$this, 'add'], $route);
        }
    }
528212
public function addPage(\CampaignChain\Location\FacebookBundle\Entity\Page $pages)
    {
        $this->pages[] = $pages;

        return $this;
    }
608797
public function followPage($page)
    {
        \PHPUnit_Framework_Assert::assertNotNull(
            $link = $this->findPager()->findLink($page),
            sprintf('The page "%s" could not be found.', $page)
        );

        $link->click();
    }
906262
private static function page($page, array $details)
    {
        if(($page === '*' && is_page()) || is_page($page))
        {
            self::loadController($details);
            exit;
        }
    }
885642
public function initPagination($rows) {
		if ($rows instanceof Paginator) {
			$this->setPagination($rows->appends(Request::all()));
		}
	}
789408
public function redirect($page)
    {
        header('Location: '.$this->url($page));

        $this->run_called = true; // prevent shutdown function from triggering.
        $this->callExit();
    }
1105450
protected function shouldShowInNavigation(&$page)
    {
        if (isset($page['rcmOnly'])
            && $page['rcmOnly']
            && empty($this->page)
        ) {
            return false;
        }

        if (isset($page['acl']) && is_array($page['acl'])
            && !empty($page['acl']['resource'])
        ) {
            $privilege = null;
            if (!empty($page['acl']['privilege'])) {
                $privilege = $page['acl']['privilege'];
            }

            $resource = $page['acl']['resource'];

            $resource = str_replace(
                [
                    ':siteId',
                    ':pageName'
                ],
                [
                    $this->currentSite->getSiteId(),
                    $this->page->getName()
                ],
                $resource
            );

            if (!empty($this->page)) {
                $resource = str_replace(
                    [
                        ':siteId',
                        ':pageName'
                    ],
                    [
                        $this->currentSite->getSiteId(),
                        $this->page->getName()
                    ],
                    $resource
                );
            } else {
                $resource = str_replace(
                    [':siteId'],
                    [$this->currentSite->getSiteId()],
                    $resource
                );
            }

            if (!$this->isAllowed->__invoke(
                GetPsrRequest::invoke(),
                $resource,
                $privilege
            )
            ) {
                return false;
            }
        }

        return true;
    }
1272315
protected function init($page, $defaults)
    {
        $grav = Grav::instance();

        $this->page = $page;
        $this->BlockTypes['{'] [] = 'TwigTag';
        $this->special_chars = ['>' => 'gt', '<' => 'lt', '"' => 'quot'];

        if ($defaults === null) {
            $defaults = (array)Grav::instance()['config']->get('system.pages.markdown');
        }

        $this->setBreaksEnabled($defaults['auto_line_breaks']);
        $this->setUrlsLinked($defaults['auto_url_links']);
        $this->setMarkupEscaped($defaults['escape_markup']);
        $this->setSpecialChars($defaults['special_chars']);

        $grav->fireEvent('onMarkdownInitialized', new Event(['markdown' => $this, 'page' => $page]));

    }
572632
public function setMoves($moves)
  {
    $moves = trim($moves);

    $this->moves = $moves;
    $this->movesCount = count(explode(' ', $moves));
  }