Do you enjoy..?


Do you enjoy really good Symfony solutions?
Of course, that’s funny to implement something by yourself. There are always almost infinitive number of solutions for this or that issue. But some solutions make your proud for your work and some of them you wish to implement somehow simpler but don’t know how to do that.

I joined Symony community and I’m always trying to keep me updated about new posts in Symfony forum:

And that’s like fishing – sometimes you may catch there real golden fish 😉

I want to propose here a couple of latest solutions from Symfony forum which was helpfull to me (this is formed like FAQ). I hope you’ll like it:

Q: is it possible to change the text in the filter fields through generator.yml?
I want to make it possible to search to ‘creation_date’: by default it shows two fields, but i want to put ‘from’ and ‘to’ before them!

A: In the options for input_date_range_tag() you can include an option for Before, Middle and After. You can use the Before and Middle options to set the From: and To:
input_date_range_tag($name, $value, array(‘before’=>’From:’, ‘middle’=>’To:’))
Unfortunately I don’t believe you can do this from the generator.yml, it must be done in the template.

Q: Confirm message for delete button on _edit page for admin panel

_delete: { name: Delete, confirm: Are you sure ? }

Q: How to implement table with parent child relationship


Q: Format currency with Admin generator

You’l have to use a partial. If it’s in the list view and that you built your module on a Foobar object, do something like:
perclaim: { name: Per Claim }
display: [_perclaim]

Then in an _perclaim.php partial, do:
getPerclaim(), ‘US’)

Q: generate-crud with propel basic inheritrance

Leave a Reply

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