We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For example, I would like to globally apply following configuration so it would be to every invokation of BootstrapPaginatorhelper#numbers()
BootstrapPaginatorhelper#numbers()
[ "size" => "small", "prev" => "<", "next" => ">", "ellipsis" => true, "first"=>"first", "last"=>"last", ]
Right now I have to put those options to every invocation am I correct? It would be great to have ability to confiugre those values as defaults.
I think that perfect fit would be upon helper initialization
'Paginator' => [ 'className' => 'Bootstrap.BootstrapPaginator', 'numbers' => [ "size" => "small", "prev" => "<", "next" => ">", "ellipsis" => true, "first" => "first", "last" => "last", ] ],
And after quick glance at the source, I found out that its is all about adding 2 lines
if ($this->getConfig("numbers")) { $options += $this->getConfig("numbers"); }
at the beginning of numbers method. Clean code and handy solution.
numbers
The text was updated successfully, but these errors were encountered:
Easiest way to do this is to create your own helper and override numbers:
namespace App\View\Helper; class MyPaginatorHelper extends \Bootstrap\View\Helper\PaginatorHelper { public function numbers(array $options = []) { $options += [ "size" => "small", "prev" => "<", "next" => ">", "ellipsis" => true, "first" => "first", "last" => "last", ]; return parent::numbers($options); } }
Sorry, something went wrong.
No branches or pull requests
For example, I would like to globally apply following configuration so it would be to every invokation of
BootstrapPaginatorhelper#numbers()
Right now I have to put those options to every invocation am I correct? It would be great to have ability to confiugre those values as defaults.
I think that perfect fit would be upon helper initialization
And after quick glance at the source, I found out that its is all about adding 2 lines
at the beginning of
numbers
method. Clean code and handy solution.The text was updated successfully, but these errors were encountered: