Hey there,

in sf1.2+, the admin filtering is handled via filter form classes, so
all customization and filter logic should go in there.
The form is not only responsible for displaying and validating the
widgets, but since it extends sfFilterForm it also contains methods
that build a query / criteria object for you.
So, you can literally handle all, even the most complex, filtering
operations completely within a filter form class.

Does that help? If not, please specify what you're trying to do and
I'll try to help better.

Daniel




On Apr 30, 12:58 pm, fRAnKEnSTEin <shirkav...@gmail.com> wrote:
> Hi,
>
> I need to create a custom "complex" filtering criteria in the admin
> generator backend. In previeus version of symfony(ie 1.1) this can
> done by overwriting the "addFiltersCriteria", method but in symfony
> 1.4 dont now how to achive this?
>
> For now, i have modfied my module's "generator.yml" file to use a
> partial for rendering the filtering section in the view as follows:
> ...
> filter:
>         display: [ _state ]
> ...
>
> In the partial(_state) i have the next html:
>
> <input id='myCustomInput1' name="myCustomInput1"/>
> <input id='myCustomInput2' name="myCustomInput2"/>
>
> Now i want to create my custom criteria using the  inputs defined in
> the _state partial above, like so:
>
> (initial_date <=  myCustomInput1 and final_date >= myCustomInput1 )
> or
> (final_date >=  myCustomInput2 and initial_date <= myCustomInput2 )
> or
> (initial_date >= myCustomInput1 and final_date <= myCustomInput2)
>
> 1- Where do i have to add my custom query?
> 2- How can i access the "myCustomInput1" inputs defined in the partial
> to create the query i need?
>
> PD: I have generate the admin backend using this comand: "php symfony
> generate:app backend"
>
> Cheers
>
> --
> 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 
> athttp://groups.google.com/group/symfony-users?hl=en

-- 
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