Symfony Filter links

Sometimes, it’s not easy with Symfony’ filters to create links displaying a content already filtered without using a specific action.

These are examples of how it works directly with an URL generated with a link_to() :

<?php echo link_to('New Application', 'applicant', array('sort' => 'created_at', 'sort_type' => 'desc'))?> <br />

<?php echo link_to('Waiting reply app.', 'applicant/filter', array('query_string' => 'filter=applicant_filter&applicant_filters[status_id]=2'))?><br />

<?php echo link_to('Accepted app.', 'applicant/filter', array('query_string' => 'filter=applicant_filter&applicant_filters[status_id]=5'))?> <br />


Latest posts by Fab (see all)

About Fab

Solutions Architect, I build great workflows for the news, media and broadcast industries. I play with data too.

Leave a comment

Your email address will not be published. Required fields are marked *