[Solar-talk] pager + controller + model + view
Rodrigo Moraes
rodrigo.moraes at gmail.com
Wed Jul 11 09:41:29 CDT 2007
2007/7/11, Paul M Jones:
> Paging is a common-enough operation that it might be OK to make
> allowances for it in Solar_App_Base. Good idea Rodrigo. :-)
>
> Now for some feedback:
>
> > App_Base pager property:
> > * $layout_pager: array with pager values ('page', 'paging', 'count')
>
> Would this necessarily be a "layout" element? It seems to me that
> paging is a function of the view, not of the layout. We have
> $controller and $action, perhaps adding $pager is in line with that.
> (Although I can see an argument for the pager as part of the
> navigation system.)
I thought this later, after I created the var and sent this e-mail.
Your arguments make sense, and calling it just $pager would be better
for me too.
> Also, I think instead of 'count' it ought to be 'total' and 'pages',
> so that it maps more closely to the fetchCount() array return.
>
> That would end up looking something like:
>
> $this->pager = array(
> 'total' => 100,
> 'pages' => 20,
> 'page' => 1,
> 'paging' => 5,
> );
Ah, also I changed it later to follow fetchCount() keys. The pager
helper now uses exactly these keys you mentioned. :)
> > App_Base pager method:
> > * _setPager():
>
> I don't think I'm ready to commit to a method for this in
> Solar_App_Base yet ...
You don't need! It can be an action helper. =)
> > The_setPager() method is defined in this class:
> > [1] http://dev.tipos.org/browser/trunk/Tipos/App/Base.php
>
> ... and I don't see it there anyway; did I miss it?
Aha, here is the helper:
http://dev.tipos.org/browser/trunk/Tipos/Controller/Helper/SetPager.php
:)
-- rodrigo
More information about the Solar-talk
mailing list