PHP code example of fmasa / nette-pagination

1. Go to this page and download the library: Download fmasa/nette-pagination library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fmasa / nette-pagination example snippets


protected function createComponentPagination()
{
    $pagination = new \fmasa\Controls\Pagination;

    // Set your own template, otherwise default one will be used
    $pagination->template->setFile(__DIR__.'/myAwesomePagination.latte');

    return $pagination;
}

public function renderDefault()
{
    // Obtain Paginator from component
    $paginator = $this['pagination']->paginator; // or $this['pagination']->getPaginator();
}