• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/ui/reversepagenavigation.php
  • Класс: BitrixMainUIReversePageNavigation
  • Вызов: ReversePageNavigation::getOffset
public function getOffset()
{
	if($this->allRecords)
	{
		return 0;
	}

	$offset = 0;
	$pageCount = $this->getPageCount();
	$currentPage = $this->getCurrentPage();

	if($currentPage <> $pageCount)
	{
		//counting the last page (wich is the first one on reverse paging)
		$offset += ($this->recordCount % $this->pageSize);
	}

	$offset += ($pageCount - $currentPage) * $this->pageSize;

	return $offset;
}