Mine was written in Propel. You will need to use the Doctrine
equivalent methods in the correct places. I have never used Doctrine
(yet) so can't do that for you

On Wed, Mar 10, 2010 at 3:17 PM, ziclo <lauren...@gmail.com> wrote:
> Gareth,
>
> Is your solution compatible with Doctrine ? I have a lot of errors
> when i try to implement it.
>
> Ziclo
>
> On 5 mar, 07:17, Gareth McCumskey <gmccums...@gmail.com> wrote:
>> In your view in the header cell:
>>
>> <th><?php echo 
>> link_to(image_tag('sort_icon.png'),'module/action?sort=column_name')
>> ?> </th>
>>
>> In your action:
>>
>> $this->data = TablePeer::getData($parameters, 
>> $request->getParameter('sort'));
>>
>> In your model for class TablePeer:
>>
>> public static function getData($parameters, $sort_by)
>> {
>>   $c = new Criteria();
>>   //Set all criteria that needs setting
>>   $c->addAscendingOrderByColumn(self::$sort_by);
>>   $results = self::doSelect($c);
>>
>>   return $results;
>>
>> }
>>
>> see? Easy! :)
>>
>>
>>
>> On Thu, Mar 4, 2010 at 5:46 PM, ziclo <lauren...@gmail.com> wrote:
>> > Does anyone has a tutorial about that ? The backend is usefull but a
>> > good tutorial would be appreciate in order to be able to do that kind
>> > of common functionnalities.
>>
>> > Tnak you
>>
>> > On 18 fév, 11:16, ziclo <lauren...@gmail.com> wrote:
>> >> Hello,
>>
>> >> That what i'm going to do. Thank you
>>
>> >> On 18 fév, 09:12, Gareth McCumskey <gmccums...@gmail.com> wrote:
>>
>> >> > Why not just implement it yourself? You don't need to have everything
>> >> > pre-written for it. Simply make the column heading a link pointing to
>> >> > an action that re-runs the query with the correct ORDER BY sql in
>> >> > it....
>>
>> >> > On Sat, Feb 13, 2010 at 3:55 PM, ziclo <lauren...@gmail.com> wrote:
>> >> > > Hi,
>>
>> >> > > I would like to be able to sort (order by ASC ou DESC) by clicking on
>> >> > > a colon title (th). The same way as the backend of the jobeet
>> >> > > tutorial.
>> >> > > I don't want it on the backend but on the frontend.
>>
>> >> > > With doctrine i can use the pager without difficulties but i do not
>> >> > > know how to sort a list (result of a query) by a simple click on the
>> >> > > title of a colonn.
>>
>> >> > > Does a tutorial exists about that ?
>>
>> >> > > Thank you.
>>
>> >> > > Ziclo
>>
>> >> > > --
>> >> > > You received this message because you are subscribed to the Google 
>> >> > > Groups "symfony users" group.
>> >> > > To post to this group, send email to symfony-us...@googlegroups.com.
>> >> > > To unsubscribe from this group, send email to 
>> >> > > symfony-users+unsubscr...@googlegroups.com.
>> >> > > For more options, visit this group 
>> >> > > athttp://groups.google.com/group/symfony-users?hl=en.
>>
>> >> > --
>> >> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
>> >> > twitter: @garethmcc
>>
>> > --
>> > If you want to report a vulnerability issue on symfony, please send it to 
>> > security at symfony-project.com
>>
>> > You received this message because you are subscribed to the Google
>> > Groups "symfony users" group.
>> > To post to this group, send email to symfony-users@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > symfony-users+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/symfony-users?hl=en
>>
>> --
>> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
>> twitter: @garethmcc
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to