Matthew Ratzloff wrote:
>
> However, with the first one, if you had default values set and then
> overrode them with specific values in the function call, there would be
> no way to get back to the default values unless you manually passed them
> in. Or am I interpreting what you said wrong?
>
Good point, I hadn't considered that, maybe a way to set the default values
in the controller or statically into the paginator?
You can already do the following as per the docs:
Zend_Paginator::setDefaultScrollingStyle('Sliding');
Zend_View_Helper_PaginationControl::setDefaultViewPartial('my_pagination_control.phtml');
$paginator->setView($view);
But it's three different methods in two different classes to accomplish
something you could do in one place. Could the paginator not take the first
two options and any params you wish to send? Then the view helper can
retrieve these unless they are passed to the script and if nothing is passed
or set use the defaults?
This seems a better way round to my original idea anyway, but I think the
key would be the common interface into the paginator as from an ease of
learning point of view you don't want to have to put data in three different
places to activate one control.
$paginator->setScrollingStyle();
$paginator->setPartial();
$paginator->setView();
It's basically all there already anyway, both the paginator and the view
helper call each other from what I can see, so maybe I'm just being picky
but I won't back down ;)
In short a common interface to setup the pagination controls for the view
without having to actually remember the different bits to set in the
different classes.
Otherwise it's a brilliant addition to the framework and one of the easiest
to pick up and just use and so easy to implement custom adapters.
-----
Simon
http://www.ajb007.co.uk/
--
View this message in context:
http://www.nabble.com/Zend_Paginator-tp19245710p19258124.html
Sent from the Zend Framework mailing list archive at Nabble.com.