PHP code example of delboy1978uk / bone-view

1. Go to this page and download the library: Download delboy1978uk/bone-view 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/ */

    

delboy1978uk / bone-view example snippets


return $response->withHeader('layout', 'layouts::your-template');

$this->alertBox($messages);

$alert = new \Bone\View\Helper\AlertBox();
echo $alert->alertBox(['Great success!', 'success']);



$viewHelper = new \Bone\View\Helper\Paginator();
$viewHelper->setCurrentPage(3); // this number will come from the url
$viewHelper->setUrl('/some/page/:number'); // this is the url you are generating
$viewHelper->setUrlPart(':number'); // this is the part of the url you will replace with the page number
$viewHelper->setPageCount(10); // this is the total number of pages
$viewHelper->setPageCountByTotalRecords(50, 10); // Or pass in a row count and num per page to set page count
$viewHelper->setPagerSize(5);  // this is the number of pages directly clickable in the generated pager
$pagination = $viewHelper->render();