getRendered() публичный Метод

Displays the pager on screen based on templates and options defined.
public getRendered ( array $options = [] ) : string
$options array
Результат string
Пример #1
0
 /**
  * {@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', '&laquo;', 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', '&raquo;', true);
     $options['page_number'] = $this->pager->getNextPage();
     $result .= $this->processPage($options);
     $this->selectedTemplate = $originTemplate;
     $result .= '</ul>';
     return $result;
 }
Пример #2
0
 /**
  * {@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', '&laquo;', 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', '&raquo;', true);
     $options['page_number'] = $this->pager->getNextPage();
     $result .= $this->processPage($options);
     $this->selectedTemplate = $originTemplate;
     $result .= '</div>';
     return $result;
 }