/** * {@inheritdoc} * * @param array $options * @return string */ public function getRendered(array $options = array()) { $result = '<ul class="pagination">'; $bootstrapSelected = '<li class="disabled"><span>{%page}</span></li>'; $originTemplate = $this->selectedTemplate; $this->selectedTemplate = $bootstrapSelected; $this->addMaskReplacement('page', '«', true); $options['page_number'] = $this->pager->getPreviousPage(); $result .= $this->processPage($options); $this->selectedTemplate = $originTemplate; $this->removeMaskReplacement('page'); $result .= parent::getRendered($options); $this->selectedTemplate = $bootstrapSelected; $this->addMaskReplacement('page', '»', true); $options['page_number'] = $this->pager->getNextPage(); $result .= $this->processPage($options); $this->selectedTemplate = $originTemplate; $result .= '</ul>'; return $result; }
/** * {@inheritdoc} * * @param array $options * @return string */ public function getRendered(array $options = []) { $result = '<div class="ui pagination menu">'; $bootstrapSelected = '<a class="item">{%page}</a>'; $originTemplate = $this->selectedTemplate; $this->selectedTemplate = $bootstrapSelected; $this->addMaskReplacement('page', '«', true); $options['page_number'] = $this->pager->getPreviousPage(); $result .= $this->processPage($options); $this->selectedTemplate = $originTemplate; $this->removeMaskReplacement('page'); $result .= parent::getRendered($options); $this->selectedTemplate = $bootstrapSelected; $this->addMaskReplacement('page', '»', true); $options['page_number'] = $this->pager->getNextPage(); $result .= $this->processPage($options); $this->selectedTemplate = $originTemplate; $result .= '</div>'; return $result; }