Set Page.

@ApiAction()

@param PageDataModel $pageModel

@return bool
491246
public function setPage(PageDataModel $pageModel)
    {
        $pageModel
            ->setModified(new \DateTime())
            ->setEntityManager($this)
            ->save();

        return true;
    }
245958
public function setPager($pager)
    {
        if ($pager && !\is_string($pager) && !$pager instanceof OutputPager) {
            throw new \InvalidArgumentException('Unexpected pager instance');
        }

        $this->pager = $pager;
    }
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());
    }
1322838
protected function setPagerListTransaction()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->transaction->getList($conditions)
        );

        return $this->data_limit = $this->setPager($pager);
    }
293595
public function creating(Page $model)
    {
        $slugs = $model->getTranslations('slug');
        foreach ($slugs as $locale => $slug) {
            $uri = $this->incrementWhileExists($model, $slug, $locale);
            $model->setTranslation('uri', $locale, $uri);
        }
    }
1193229
public function setModel(Model $model)
    {
        $this->model = $model;
        $append = $this->getAppends();

        if ($append instanceof WithModelInterface) {
            $append->setModel($model);
        }

        return $this;
    }
441169
public function setPage(ChildPage $v = null)
    {
        if ($v === null) {
            $this->setPageId(NULL);
        } else {
            $this->setPageId($v->getId());
        }

        $this->aPage = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildPage object, it will not be re-added.
        if ($v !== null) {
            $v->addM2P($this);
        }


        return $this;
    }
948143
protected function setPagerListPage()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->page->getList($conditions)
        );

        return $this->data_limit = $this->setPager($pager);
    }
1334551
protected function setPagerListStore()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->store->getList($conditions)
        );

        return $this->data_limit = $this->setPager($pager);
    }
16805
private function setPageEnd()
    {
        $lastPage = $this->currentPage + $this->numberLinks;

        if ($lastPage <= $this->nbPages) {
            $this->pageEnd = $lastPage;
        } else {
            $this->pageEnd = $this->nbPages;
        }
    }
426003
public function setPage($data) {
		if ($data instanceof Builder) {
			$data = $data->limit($this->getLimit())->all();
		}
		$this->setAttribute($data);
		return $this;
	}
220905
public function setDatamodel(\TechPromux\DynamicQueryBundle\Entity\DataModel $datamodel)
    {
        $this->datamodel = $datamodel;

        return $this;
    }
974071
public function setCurrentPage( $page_number )
	{
		if ( !is_int( $page_number ) )
		{
			trigger_error( 'Pagination setCurrentPage: Page number must be an integer.' );
			return false;
		}

		if ( $page_number <= 0 )
		{
			trigger_error( 'Pagination setCurrentPage: Page number must be a positive integer.' );
			return false;
		}

		$this->current_page_number = $page_number;
	}
454098
public function setPage($page)
    {
        Argument::i()->test(1, 'int');
        
        if ($page < 1) {
            $page = 1;
        }
        
        $this->start = ($page - 1) * $this->range;
        
        return $this;
    }
165994
private function setCurrentPage()
    {
        if ($this->perPage == 'all') return;

        if ($this->hasInput('page'))
        {
            $page_input = $this->getInput('page');

            if ($this->isValidPageNumber($page_input))
            {
                $this->page = $page_input;
            }
        }
    }
1235801
protected function _setData() {
        if (($this->_currentPage == 0)) {
            $linkDisabled = false;
        }
        else {
            $linkDisabled = true;
        }

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

        $this->_nbrPage = ceil($this->_entry / $this->_byPage);

        if ($this->_nbrPage == 0) {
            $this->_nbrPage = 1;
        }

        if ($this->_currentPage > $this->_nbrPage) {
            $this->_currentPage = $this->_nbrPage;
        }

        if ($this->_currentPage == 1) {
            $this->_paginationFirstBefore = false;
        }

        if ($this->_currentPage == $this->_nbrPage) {
            $this->_paginationLastAfter = false;
        }

        //useless to hide links if there isn't pages enough
        if ($this->_paginationCut == false || $this->_paginationCut > $this->_nbrPage) {
            for ($i = 1; $i <= $this->_nbrPage; $i++) {
                if ($i == $this->_currentPage && $linkDisabled != false) {
                    $this->_paginationList[$i] = false;
                }
                else {
                    $this->_paginationList[$i] = preg_replace('#\{page\}#isU', $i, $this->_url);
                }
            }
        }
        else {
            if ($this->_paginationCut > (($this->_nbrPage / 2) - 2)) {
                $this->_paginationCut = intval(($this->_nbrPage / 2));
            }

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

            if (($this->_currentPage - $this->_paginationCut) > 0 && ($this->_currentPage + $this->_paginationCut) < $this->_nbrPage) {
                for ($i = $this->_currentPage - $this->_paginationCut; $i <= $this->_currentPage + $this->_paginationCut; $i++) {
                    if ($i == $this->_currentPage && $linkDisabled != false) {
                        $this->_paginationList[$i] = false;
                    }
                    else {
                        $this->_paginationList[$i] = preg_replace('#\{page\}#isU', $i, $this->_url);
                    }
                }
            }
            elseif (($this->_currentPage - $this->_paginationCut) > 0 && ($this->_currentPage + $this->_paginationCut) >= $this->_nbrPage) {
                for ($i = $this->_currentPage - $this->_paginationCut; $i <= $this->_nbrPage; $i++) {
                    if ($i == $this->_currentPage && $linkDisabled != false) {
                        $this->_paginationList[$i] = false;
                    }
                    else {
                        $this->_paginationList[$i] = preg_replace('#\{page\}#isU', $i, $this->_url);
                    }
                }
            }
            elseif (($this->_currentPage - $this->_paginationCut) <= 0 && ($this->_currentPage + $this->_paginationCut) < $this->_nbrPage) {
                for ($i = 1; $i <= $this->_currentPage + $this->_paginationCut; $i++) {
                    if ($i == $this->_currentPage && $linkDisabled != false) {
                        $this->_paginationList[$i] = false;
                    }
                    else {
                        $this->_paginationList[$i] = preg_replace('#\{page\}#isU', $i, $this->_url);
                    }
                }
            }
            else {
                for ($i = 1; $i <= $this->_nbrPage; $i++) {
                    if ($i == $this->_currentPage && $linkDisabled != false) {
                        $this->_paginationList[$i] = false;
                    }
                    else {
                        $this->_paginationList[$i] = preg_replace('#\{page\}#isU', $i, $this->_url);
                    }
                }
            }
        }
    }
985225
public function setPage($page)
    {
        if ($page > $this->getNumberOfPages() || $page < 1) {
            throw new PageDoesNotExist("Page {$page} does not exist");
        }

        $this->page = $page;

        return $this;
    }