Landish\Pagination\Pagination::render PHP Method

render() public method

Convert the URL window into Pagination HTML.
public render ( ) : string
return string
    public function render()
    {
        if ($this->hasPages()) {
            return sprintf($this->getPaginationWrapperHTML(), $this->getPreviousButton(), $this->getLinks(), $this->getNextButton());
        }
        return '';
    }

Usage Example

 public function testBootstrapPresenterCanGeneratorLinksForWhenOnFirstPage()
 {
     $p = new LengthAwarePaginator($this->array, count($this->array), 1, 1);
     $presenter = new BootstrapPresenter($p);
     $this->assertEquals(trim(file_get_contents($this->dir . 'first_page.html')), $presenter->render());
 }