Reutrn the meta description for a page.

If no page is given then the active page is used.

The page description property will be used, if that isn't set then the page standfirst is used.

@param null|Page $page

@return string
507058
public static function description(PageInterface $page = null)
    {
        $page = $page ?: Router::getActivePage();
        $description = $page->getDescription() ?:
            ChunkFacade::get('text', 'standfirst', $page)->text();

        return strip_tags($description);
    }
742628
public static function startPage($page = null)
    {
        if ($page !== null) {
            self::$_startPage = $page;
        }
        return self::$_startPage;
    }
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 '';
    }
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;
    }
523520
public function getDelete(Page $page)
    {
        $this->authorize('delete', $page);

        return view($this->viewPrefix.'.delete', [
            'children' => $page->countChildren(),
            'page'     => $page,
        ]);
    }
1199362
public function index($page = null)
    {
        $url = 'people.json';

        $people = $this->client->get($url, [
            'query' => [
                'page' => $page,
            ]
        ]);

        return $this->indexResponse($people, Person::class);
    }
1233897
private function saveIfEmpty(Page $page)
    {
        $metadata = $this->container
                ->get('nestednode.metadata.resolver')
                ->resolve($page);

            $page->setMetaData($metadata);
            if ($this->container->get('em')->contains($page)) {
                $this->container->get('em')->flush($page);
            }

            return $page;
    }
1245904
public function init(Page $page = null)
    {
        if (!$page) {
            return $this;
        }

        $this->page = $page;
        $this->online = $page->isOnline();
        $this->name = $page->getName();
        $this->meta = $page->getMeta();
        $this->openGraph = $page->getOpenGraph();
        $this->title = $page->getTitle();

        return $this;
    }
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;
    }
508352
public function addPage($page = null)
    {
        if ($page = parent::addPage($page)) {
            $page->setParent($this);
        }

        return $page;
    }
436936
private function findChildrenPages(Page $page)
    {
        $pages = Page::where('parent_id', $page->id)->orderBy('header_order')->get();

        return $pages;
    }
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;
    }
1309594
public function getOnlineNextSibling(Page $page)
    {
        $query = $this->createQueryBuilder('p');

        if (true === $page->hasMainSection()) {
            $query->andWhere($query->getSectionAlias().'._leftnode >= :leftnode')
                    ->orWhere('p._section IN (:sections)')
                    ->setParameter('leftnode', $page->getLeftnode())
                    ->setParameter('sections', [$page->getSection(), $page->getSection()->getParent()]);
        } else {
            $query->andWhere('p._position > :position')
                    ->setParameter('position', $page->getPosition());
        }

        return $query->andIsSiblingsOf($page, true, ['_position' => 'ASC', '_leftnode' => 'ASC'], 1, 0)
                        ->andIsOnline()
                        ->getQuery()
                        ->getOneOrNullResult();
    }
192944
public function setPage($page)
    {
        if (!is_scalar($page)) {
            $this->page = self::DEFAULT_PAGE;

            return $this;
        } else {
            $page = (int)$page;
        }

        if ($page < 1) {
            $this->page = 1;
        } else {
            $this->page = $page;
        }

        return $this;
    }
839755
public function sitemap($page = null)
    {
        $ret = array();

        foreach ($this->sitemapPages as $sitemapPage) {
            if (empty($this->pages[$sitemapPage['page_uid']])) {
                // invalid page
                continue;
            }

            $ret[] = GeneralUtility::fullUrl($sitemapPage['page_url']);
        }

        // Call hook
        GeneralUtility::callHookAndSignal(__CLASS__, 'sitemapTextOutput', $this, $ret);

        return implode("\n", $ret);
    }
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;
    }
1143363
public function setPage(Page $page)
    {
        $this->page = $page;
        $revision = $page->getCurrentRevision();
        if (empty($revision)) {
            $revision = $page->getPublishedRevision();
        }
        $revisionId = null;
        if (!empty($revision)) {
            $revisionId = $revision->getRevisionId();
        }
        $this->setRevisionId($revisionId);
        $this->setTitle($page->getPageTitle());
        $this->setPageId($page->getPageId());
    }