@param \Concrete\Core\Page\Page $page

@return string
770234
protected function getPageChangeFrequency(Page $page)
    {
        $result = '';
        $ak = $this->getSitemapChangeFrequencyAttributeKey();
        if ($ak !== null) {
            $result = (string) $page->getAttribute($ak);
        }
        if ($result === '') {
            $result = $this->getDefaultChangeFrequency();
        }

        return $result;
    }
1344694
public function generateXmlString(Parts\Page $page)
    {
        $dom = new DOMDocument('1.0', 'utf-8');
        $dom->formatOutput = true;
        $dom->loadXML('<page />');

        $pageNode = $dom->documentElement;

        foreach ($page->getState() as $attrName => $attrValue) {
            switch ($attrName) {
                case 'id':
                    $pageNode->setAttribute('id', $attrValue);
                    break;
                case 'zones':
                    foreach ($page->{$attrName} as $zone) {
                        $pageNode->appendChild($this->generateZoneXmlString($zone, $dom));
                    }
                    break;
                case 'layout':
                    $node = $dom->createElement('zone_layout', $attrValue);
                    $pageNode->appendChild($node);
                    break;
                case 'attributes':
                    foreach ($attrValue as $arrayItemKey => $arrayItemValue) {
                        $this->addNewXmlElement($dom, $pageNode, $arrayItemKey, $arrayItemValue);
                    }
                    break;
                case 'zonesById':
                    // Do not store
                    break;
                default:
                    $this->addNewNotEmptyXmlElement($dom, $pageNode, $attrName, $attrValue);
                    break;
            }
        }

        return $dom->saveXML();
    }
213619
protected function html(Page $page)
    {
        $html = $this->content->make($content = $page->content());

        if (($name = $page->layout()) !== null) {
            $data = array_merge($this->helpers(), (array) $page->data());

            $layout = new Layout($this->renderer, $this, $data);

            $html = (string) $layout->render($name, (string) $content);
        }

        foreach ($this->filters as $filter) {
            $html = $filter->filter($html);
        }

        return $html;
    }
19381
public function generate($page = null)
    {
        $this->__build();
        parent::generate($page);
        return $this->Html->generate(true);
    }
1350623
public function path($disable, $page)
    {
        if ($disable) {
            return '#';
        }

        return Route::instance()->build(
            $this->getRoute(),
            $this->getRouteParams(),
            [$this->pageArgName => $page] + ($_GET?:[])
        );
    }
70374
protected function buildLink($page)
    {
        if ($page == 1 && $this->config->getFirstPageLink()) {
            return $this->config->getFirstPageLink();
        }

        if (is_callable($this->config->getPageLink())) {
            return call_user_func($this->config->getPageLink(), $page);
        } else {
            return sprintf($this->config->getPageLink(), $page);
        }
    }
436936
private function findChildrenPages(Page $page)
    {
        $pages = Page::where('parent_id', $page->id)->orderBy('header_order')->get();

        return $pages;
    }
978681
public function actionIndex($page = 1)
    {
        $sort = [];
        $params = Yii::$app->request->queryParams;
        if (empty($params['sort'])) {
            $sort['defaultOrder'] = ['parent_uid' => SORT_ASC, 'module_id' => SORT_ASC];
        } else {
            if($params['sort'] == 'module_id') {
                $sort['defaultOrder'] = ['parent_uid' => SORT_ASC, 'module_id' => SORT_ASC];
                unset($params['sort']);
            } else if ($params['sort'] == '-module_id') {
                $sort['defaultOrder'] = ['parent_uid' => SORT_DESC, 'module_id' => SORT_DESC];
                unset($params['sort']);
            }
            Yii::$app->request->setQueryParams($params);
        }

        $dataProvider = new ActiveDataProvider([
            'query' => Modmgr::find(),
            'sort' => $sort,
        ]);

        $pager = $dataProvider->getPagination();
        $pager->pageSize = $this->pageSize;
        $pager->page = $page - 1; //! from 0

        return $this->render('index', [
            'dataProvider' => $dataProvider,
        ]);
    }
840693
public function getUrl($page)
    {
        $request = Craft::$app->getRequest();

        // Get the query string params without the path or `pattern`
        parse_str($request->getQueryString(), $params);
        $pathParam = Craft::$app->getConfig()->getGeneral()->pathParam;
        unset($params[$pathParam], $params['pattern']);

        // Return the URL with the page param
        $params[$this->pageParam] = $page;
        return UrlHelper::url($request->getPathInfo(), $params);
    }
63686
public function getUsersList($page = 1)
    {
        $this->checkPageNumber($page);

        return $this->adapter->get(sprintf('/users?page=%d', $page));
    }
1056929
public function toTrash(Page $page)
    {
        $page->setState(Page::STATE_DELETED);

        if (!$page->isLeaf()) {
            $subquery = $this->getEntityManager()
                    ->getRepository('BackBee\NestedNode\Section')
                    ->createQueryBuilder('n')
                    ->select('n._uid')
                    ->andIsDescendantOf($page->getSection());

            $this->createQueryBuilder('p')
                            ->update()
                            ->set('p._state', Page::STATE_DELETED)
                            ->andWhere('p._section IN ('.$subquery->getDQL().')')
                            ->setParameters($subquery->getParameters())
                            ->getQuery()
                            ->execute();
        }

        return $page;
    }
174274
public function getText(Page $page = null)
    {
        if ($contents = $this->get('Contents')) {

            if ($contents instanceof ElementMissing) {
                return '';
			} elseif ($contents instanceof ElementNull) {
				return '';
            } elseif ($contents instanceof PDFObject) {
                $elements = $contents->getHeader()->getElements();

                if (is_numeric(key($elements))) {
                    $new_content = '';

                    foreach ($elements as $element) {
                        if ($element instanceof ElementXRef) {
                            $new_content .= $element->getObject()->getContent();
                        } else {
                            $new_content .= $element->getContent();
                        }
                    }

                    $header   = new Header(array(), $this->document);
                    $contents = new PDFObject($this->document, $header, $new_content);
                }
            } elseif ($contents instanceof ElementArray) {
                // Create a virtual global content.
                $new_content = '';

                foreach ($contents->getContent() as $content) {
                    $new_content .= $content->getContent() . "\n";
                }

                $header   = new Header(array(), $this->document);
                $contents = new PDFObject($this->document, $header, $new_content);
            }

            return $contents->getText($this);
        }

        return '';
    }
130799
protected function checkGetRequest($page)
    {
        $this->url .= $this->explodeRequestGetValue();

        if( strstr($this->url, '?') )
        {
            $urlEx = explode('?', $this->url);

            return Base::suffix($urlEx[0]) . $page . '?' . rtrim($urlEx[1], '/');
        }

        return $this->type === 'ajax' ? $this->url : Base::suffix($this->url) . $page;
    }
1291910
static function FindPageRights(Page $page)
    {
        $currPage = $page;
        $result = null;
        do 
        {
            $result = $currPage->GetUserGroupRights();
            $currPage = $currPage->GetParent();
        } 
        while (!$result && $currPage);
        if (!$result && $page->GetSite())
        {
            $siteRights = $page->GetSite()->GetUserGroupRights();
            if ($siteRights)
            {
                return $siteRights->GetPageRights();
            }
        }
        return $result;
    }
45349
public function update(Page $page)
    {
        $attributes = request()->validate(Page::$rules, Page::$messages);

        $attributes['is_header'] = boolval(input('is_header'));
        $attributes['is_hidden'] = boolval(input('is_hidden'));
        $attributes['is_footer'] = boolval(input('is_footer'));
        $attributes['is_featured'] = boolval(input('is_featured'));

        $page = $this->updateEntry($page, $attributes);
        $page->updateUrl()->save();
        $page->banners()->sync(input('banners'));

        return redirect_to_resource();
    }
323069
public function getPageUrl($page){
        $qs = '';
        if($_SERVER['QUERY_STRING']){
            $qs = '?' . $_SERVER['QUERY_STRING'];
        }//if
        return str_replace($this->fromFormat($this->currentPage),$this->fromFormat($page),$this->uri) . $qs;
    }
998705
public function getMetadataAction(Page $page)
    {
        $metadata = null !== $page->getMetaData() ? $page->getMetaData()->jsonSerialize() : array();
        if (empty($metadata)) {
            $metadata = $this->application->getContainer()->get('nestednode.metadata.resolver')->resolve($page);
        }

        return $this->createJsonResponse($metadata);
    }