> Required to prevent typo3 to escape the html output * @var boolean */ protected $escapeOutput = false; /** * -- This method is expected by Fluid -- * Declares the viewhelper's parameters */ public function initializeArguments() { $this->registerArgument( 'collection', 'object', 'The ApiPagedCollection object', true ); } /** * -- This method is expected by Fluid -- * Renders the content as html * * @return string Rendered tag */ public function render() { $collection = $this->arguments['collection']; $lastPage = $collection->getLastPage(); $currentPage = $collection->getCurrentPage(); if (!$lastPage > 0) { return ""; } $divWrapper = '
'; $goToFirst = 'translate('go-to-first-page') . '">' . '' . ''; $goToLast = 'translate('go-to-last-page') . '">' . '' . ''; $startAt = $currentPage > 6 ? $currentPage - 5 : 1; $endAt = $currentPage < ($lastPage - 5) ? $currentPage + 5 : $lastPage; $ul = '