Get the current page for the request.

@param  int|null  $total
@return int
19057
public function getCurrentPage($total = null)
	{
		if (is_null($total))
		{
			return $this->currentPage;
		}
		else
		{
			return min($this->currentPage, (int) ceil($total / $this->perPage));
		}
	}
181205
public function getCurrentRequestContent()
    {
        if ($this->requestStack->getCurrentRequest() instanceof Request) {
            return $this->requestStack->getCurrentRequest()->getContent();
        }
        return null;
    }
847415
function current()
    {
        if (!isset($this->_curPage)
            || $this->_curPage->getPage() != $this->_position
        ) {
            $this->_curPage = $this->_pages->get($this->_position);
        }
        return $this->_curPage;
    }
702105
public function getCurrentPage()
    {
        $page = $this->getRequest()->query->getInt($this->getActionQueryParameter(static::QUERY_PARAMETER_PAGE), 1);
        if ($page < 1) {
            $page = 1;
        }
        return $page;
    }
632378
public function getTotalPages()
    {
        if ($this->totalItems > 0 && $this->itemsPerPage > 0) {
            if (($this->totalItems%$this->itemsPerPage) != 0) {
                return (int)($this->totalItems/$this->itemsPerPage) + 1;
            }
            else {
                return (int)($this->totalItems/$this->itemsPerPage);
            }
        }

        return 0;
    }
607640
public function getTotal()
    {
        if (is_null($this->_total)) {
            if (($total = $this->predictTotal())) {
                $this->_total = $total;
            } elseif (isset($this->_items)) {
                return count($this->_items);
            } else {
                $this->_total = false;
            }
        }

        return $this->_total;
    }
1107879
public function getTotalPage()
    {
        $this->pageSize > 0 || $this->pageSize = 10;

        $totalPage = ceil($this->total / $this->pageSize);

        $totalPage >= 1 || $totalPage = 1;

        return $totalPage;
    }
10647
public function getCurrentPageNumber()
    {
        $request = $this->getRequest();

        $optionsRenderer = $this->getOptionsRenderer();
        $parameterNames = $optionsRenderer['parameterNames'];
        if ($request->getParam($parameterNames['currentPage']) != '') {
            return (int) $request->getParam($parameterNames['currentPage']);
        }

        return (int) 1;
    }
393452
public function current($page = null)
    {
        if ($page === null) {
            return $this->options['page'];
        } else {
            $this->options['page'] = $page;
            return $this;
        }
    }
854909
public function getNextPage()
    {
        $nextPageIndex = $this->currentPage->getIndex() + 1;
        if (!$this->formDefinition->hasPageWithIndex($nextPageIndex)) {
            return null;
        }
        return $this->formDefinition->getPageByIndex($nextPageIndex);
    }
242726
public function current()
    {
        if (!$this->page) {
            $this->page = $this->executeCall();
        }

        $this->moreResultsType = isset($this->page['batch']['moreResults'])
            ? $this->page['batch']['moreResults']
            : null;

        return $this->get($this->itemsPath, $this->page);
    }
1044535
protected function getNext() {
		if ($this->get('page')< $this->pageTotal) {
			return $this->replaceLine($this->get('page')+ 1, $this->get('next'));
		}
		return null;
	}
342866
public function current()
    {
        $page = $this->pageIterator->current();

        return isset($page[$this->pageIndex])
            ? $page[$this->pageIndex]
            : null;
    }
1172936
public function getRequestCurrent($optional = false)
    {
        $requestStack = $this->getRequestStack($optional);

        if (null === $requestStack) {
            return null;
        }

        return $this->getRequestStack($optional)->getCurrentRequest();
    }
218792
public function getCurrent()
    {
        if (is_null($this->current))
        {
            $siteView = $this->makeNewViewModel();

            $this->current = $siteView;
        }

        return $this->current;
    }
64724
protected function handlePaginationRequest($request, $model, $total = null)
    {
        $page = $request->pageNumber;
        $perPage = $request->pageSize;
        if (!$total) {
            $total = $model->count();
        }
        $results = $model->forPage($page, $perPage)->get(array('*'));
        $paginator = new LengthAwarePaginator($results, $total, $perPage, $page, [
            'path' => Paginator::resolveCurrentPath(),
            'pageName' => 'page[number]'
        ]);
        $paginator->appends('page[size]', $perPage);
        if (!empty($request->filter)) {
            foreach ($request->filter as $key=>$value) {
                $paginator->appends($key, $value);
            }
        }
        if (!empty($request->sort)) {
            $paginator->appends('sort', implode(',', $request->sort));
        }

        return $paginator;
    }
884360
public function current(){

        if($this->currentPageType !== false){
            return $this->currentPageType;
        }

        $this->currentPageType = null;

        if(!$path = $this->pathProvider->getCurrentCmsPath()){
            return;
        }

        $this->currentPageType = $path->getPageType();

        return $this->currentPageType;

    }