@since 0.2

@param Page $page
@param array $extraParams

@return Page
341017
public function getFromPage( Page $page, array $extraParams = [] ) {
		$result =
			$this->api->getRequest(
				new SimpleRequest(
					'query',
					$this->getQuery( [ 'pageids' => $page->getId() ], $extraParams )
				)
			);
		$revisions = $this->getRevisionsFromResult( array_shift( $result['query']['pages'] ) );
		$revisions->addRevisions( $page->getRevisions() );

		return new Page(
			$page->getPageIdentifier(),
			$revisions
		);
	}
962820
public function setPage(int $page) {
        if ($page < 0) {
            throw new \InvalidArgumentException("Invalid page '$page.'", 500);
        }

        $this->setOffset(($page - 1) * $this->getLimit());
        return $this;
    }
801929
public static function page($page = null)
    {
        if ($page !== null) {
            self::$_page = $page;
        }
        return self::$_page;
    }
453604
public function generate(Page $page, AbstractClassContent $content = null, $force = false, $exceptionOnMissingScheme = true)
    {
        if (!is_bool($force)) {
            throw new \InvalidArgumentException(sprintf(
                '%s method expect `force parameter` to be type of boolean, %s given',
                __METHOD__,
                gettype($force)
            ));
        }

        if (
            null !== $page->getUrl(false)
            && $page->getState() & Page::STATE_ONLINE
            && (!$force && $this->preserveOnline)
        ) {
            return $page->getUrl(false);
        }

        if ($page->isRoot() && array_key_exists('_root_', $this->schemes)) {
            return $this->doGenerate($this->schemes['_root_'], $page, $content);
        }

        if (isset($this->schemes['_layout_']) && is_array($this->schemes['_layout_'])) {
            if (array_key_exists($page->getLayout()->getUid(), $this->schemes['_layout_'])) {
                return $this->doGenerate($this->schemes['_layout_'][$page->getLayout()->getUid()], $page);
            }
        }

        if (null !== $content && array_key_exists('_content_', $this->schemes)) {
            $shortClassname = str_replace(AbstractContent::CLASSCONTENT_BASE_NAMESPACE, '', get_class($content));
            if (array_key_exists($shortClassname, $this->schemes['_content_'])) {
                return $this->doGenerate($this->schemes['_content_'][$shortClassname], $page, $content);
            }
        }

        if (array_key_exists('_default_', $this->schemes)) {
            return $this->doGenerate($this->schemes['_default_'], $page, $content);
        }

        $url = $page->getUrl(false);
        if (!empty($url)) {
            return $url;
        }

        if (true === $exceptionOnMissingScheme) {
            throw new RewritingException(
                sprintf('No rewriting scheme found for Page (#%s)', $page->getUid()),
                RewritingException::MISSING_SCHEME
            );
        }

        return '/'.$page->getUid();
    }
574813
public function url($page)
    {
        if ($page <= 0) {
            $page = 1;
        }

        // If we have any extra query string key / value pairs that need to be added
        // onto the URL, we will put them in query string form and then attach it
        // to the URL. This allows for extra information like sortings storage.
        $parameters = [$this->pageName => $page];

        if (count($this->query) > 0) {
            $parameters = array_merge($this->query, $parameters);
        }

        $uri = Uri::createFromString($this->path);

        parse_str($uri->getQuery(), $queryParts);

        return $uri->withQuery(http_build_query($parameters + $queryParts))
            ->withFragment($this->buildFragment())
            ->__toString();
    }
22731
public function getUrl($page)
	{
		$parameters = array(
			$this->env->getPageName() => $page,
		);

		// If we have any extra query string key / value pairs that need to be added
		// onto the URL, we will put them in query string form and then attach it
		// to the URL. This allows for extra information like sortings storage.
		if (count($this->query) > 0)
		{
			$parameters = array_merge($parameters, $this->query);
		}

		$fragment = $this->buildFragment();

		return $this->env->getCurrentUrl().'?'.http_build_query($parameters, null, '&').$fragment;
	}
320738
public static function fromParams(AbstractQuery $query, $perPage = 15, $page = 1, $fetchJoinCollection = true)
    {
        return new static(
            $query,
            $perPage,
            function () use ($page) {
                return $page;
            },
            $fetchJoinCollection
        );
    }
97943
public function move( Page $page, Title $target, array $extraParams = [] ) {
		$this->api->postRequest(
			new SimpleRequest(
				'move', $this->getMoveParams( $page->getId(), $target, $extraParams )
			)
		);

		return true;
	}
1309853
public static function url($page, array $params = [])
    {
        /*
         * Reuse existing controller or create a new one,
         * assuming that the method is called not during the front-end
         * request processing.
         */
        $controller = Controller::getController() ?: new Controller;

        return $controller->pageUrl($page, $params, true);
    }
683994
public function setPage(int $page = 1): Select
    {
        if (!$this->limit) {
            throw new DbException('Please setup limit for use method `setPage`');
        }
        $this->offset = $this->limit * ($page - 1);
        return $this;
    }
9288
public function addPage($page)
    {
        if (is_array($page)) {
            $page = static::makePage($page);
        } elseif (is_string($page) or is_null($page)) {
            $title = $page;

            $page = app(PageInterface::class);
            $page->setTitle($title);
        }

        if (! ($page instanceof PageInterface)) {
            return;
        }

        $this->getPages()->push($page);

        return $page;
    }
909229
public function page($page = null) {
        if ($page === null) {
            return $this->page;
        }

        $this->page = (int) $page;

        return $this;
    }
668750
public function getOnlinePrevSibling(Page $page)
    {
        $query = $this->createQueryBuilder('p')
                ->andIsSiblingsOf($page, true, ['_leftnode' => 'DESC', '_position' => 'DESC'], 1, 0)
                ->andIsOnline();

        if (true === $page->hasMainSection()) {
            $query->andIsSection()
                    ->andWhere($query->getSectionAlias().'._leftnode < :leftnode')
                    ->setParameter('leftnode', $page->getLeftnode());
        } else {
            $qOR = $query->expr()->orX();
            $qOR->add('p._section != p')
                    ->add($query->getSectionAlias().'._parent = :parent');

            $query->andWhere('p._position < :position')
                    ->andWhere($qOR)
                    ->setParameter('position', $page->getPosition())
                    ->setParameter('parent', $page->getParent()->getSection());
        }

        return $query->getQuery()
                        ->getOneOrNullResult();
    }
884846
public function setPage($page)
    {
        $this->offset = (max(1, (int) $page) - 1) * $this->perPage;

        return $this;
    }
756716
protected function createCreateForm(Page $page)
    {
        $channel = $this->getSelectedChannel();

        $form = $this->createForm(
            PageType::class,
            $page,
            [
                'action' => $this->generateUrl('integrated_page_page_new', ['channel' => $channel->getId()]),
                'method' => 'POST',
                'theme'  => $this->getTheme($channel),
            ]
        );

        $form->add('actions', SaveCancelType::class, [
            'cancel_route' => 'integrated_page_page_index',
            'cancel_route_parameters' => ['channel' => $this->getSelectedChannel()->getId()],
            'label' => 'Create',
            'button_class' => '',
        ]);

        return $form;
    }
1247151
public function page($page)
    {
        $this->limit  = 0;
        $this->offset = 0;

        $page = (int)$page;
        if ($page > 0) {
            $this->limit  = $this->paging;
            $this->offset = $this->paging * ($page - 1);
        }
        return $this;
    }
361314
public function open(array $params = array())
	{
		$url = $this->getAbsoluteUrl($params);

		if ( !$url ) {
			throw new PageException('Page url not specified', PageException::TYPE_EMPTY_URL);
		}

		$this->pageFactory->getSession()->visit($url);

		return $this;
	}