Sets a page data
@param integer $page_id
350701
protected function setPage($page_id)
    {
        $this->data_page = $this->page->get($page_id);

        if (empty($this->data_page)) {
            $this->outputHttpStatus(404);
        }

        $this->controlAccessPage();
        $this->preparePage($this->data_page);
    }
751864
protected function setTitleEditPage()
    {
        if (isset($this->data_page['page_id'])) {
            $title = $this->text('Edit %name', array('%name' => $this->data_page['title']));
        } else {
            $title = $this->text('Add page');
        }

        $this->setTitle($title);
    }
818899
protected function setPagerListCity()
    {
        $options = $this->query_filter;
        $options['count'] = true;
        $options['state_id'] = $this->data_state['state_id'];

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

        return $this->data_limit = $this->setPager($pager);
    }
854937
protected function setPagerListFieldValue()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;
        $conditions['field_id'] = $this->data_field['field_id'];

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

        return $this->data_limit = $this->setPager($pager);
    }
207934
protected function updatePage($page_id)
    {
        if (!$this->isError() && !$this->page->update($page_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
898915
public function url_page($page_slug = '', $page_id = '')
    {
        $url = $this->siteUrl('pages/' . trim($page_slug) . '-page' . $this->encodeId(trim($page_id)));

        return $url;
    }
1002701
protected function setStateCity($state_id)
    {
        $this->data_state = $this->state->get($state_id);

        if (empty($this->data_state)) {
            $this->outputHttpStatus(404);
        }
    }
314396
protected function setPagerListField()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

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

        return $this->data_limit = $this->setPager($pager);
    }
183344
function set_page($page)
    {
        $this->list_page = (int)$page;
        $this->ldap->set_vlv_page($this->list_page, $this->page_size);
    }
966893
public function write($session_id, $session_data)
	{
		$this->files->put($this->path . DS . $session_id, $session_data, true);
	}
304164
protected function setDataImagesEditPage()
    {
        $options = array(
            'entity' => 'page',
            'images' => $this->getData('page.images', array())
        );

        $this->setItemThumb($options, $this->image);
        $this->setData('attached_images', $this->getWidgetImages($this->language, $options));
    }
385781
protected function deleteLinked($page_id)
    {
        $this->db->delete('page_translation', array('page_id' => $page_id));
        $this->db->delete('file', array('entity' => 'page', 'entity_id' => $page_id));
        $this->db->delete('alias', array('entity' => 'page', 'entity_id' => $page_id));

        $sql = 'DELETE ci
                FROM collection_item ci
                INNER JOIN collection c ON(ci.collection_id = c.collection_id)
                WHERE c.type = ? AND ci.entity_id = ?';

        $this->db->run($sql, array('page', $page_id));
    }
414453
public function validatePageCollectionItem($page_id)
    {
        $page = $this->page->get($page_id);

        if (empty($page['status'])) {
            return $this->translation->text('@name is unavailable', array('@name' => $this->translation->text('Page')));
        }

        return true;
    }
560047
def set_page_property(self, page_id, data):
        
        url = 'rest/api/content/{page_id}/property'.format(page_id=page_id)
        json_data = data
        return self.post(path=url, data=json_data)
946748
public function updateCurrentPageID(&$id){
		if (!$id) {
			if($site = Multisites::inst()->getCurrentSite()){
				$id = $site->Children()->first();
			}
		}
	}
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);
                    }
                }
            }
        }
    }
171251
public void setPage(int page) {
        if(page < 0)
            throw new IllegalArgumentException(Bundle.getErrorString("PagerModel_IllegalPage"));

        /* todo: need to check that the new 'current' page is in range given the first/last boundaries */
        _currentRow = new Integer(page * getPageSize());
    }