<?php
namespace App;
use Illuminate\Pagination\BootstrapFourPresenter;
use Illuminate\Support\HtmlString;
class MaterialPresenter extends BootstrapFourPresenter
{
public function render()
{
if ($this->hasPages()) {
return new HtmlString(sprintf(
'<ul class="pagination">%s %s %s</ul>',
$this->getPreviousButton('<i class="material-icons">chevron_left</i>'),
$this->getLinks(),
$this->getNextButton('<i class="material-icons">chevron_right</i>')
));
}
return '';
}
protected function getAvailablePageWrapper($url, $page, $rel = null)
{
$rel = is_null($rel) ? '' : ' rel="' . $rel . '"';
return sprintf('<li><a class="no-decoration" href="%s"%s>%s</a></li>', htmlentities($url), $rel, $page);
}
protected function getDisabledTextWrapper($text)
{
return '<li class="disabled"><span>' . $text . '</span></li>';
}
protected function getActivePageWrapper($text)
{
return '<li class="active"><span>' . $text . '</span></li>';
}
}