Oct 09
Digg
Stumbleupon
Technorati
Delicious

Do you enjoy..?

Hey,

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:

http://www.symfony-project.com/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

A:
[php]
actions:
_delete: { name: Delete, confirm: Are you sure ? }
[/php]

Q: How to implement table with parent child relationship

A:
http://www.symfony-project.com/trac/wiki/HowToHandleHierarchicalDataWithPropel
http://www.symfony-project.com/forum/index.php/m/11511/?srch=admin+generator#msg_11511

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:
[php]
list:
fields:
perclaim: { name: Per Claim }
display: [_perclaim]
[/php]

Then in an _perclaim.php partial, do:
[php]
getPerclaim(), ‘US’)
?>
[/php]

Q: generate-crud with propel basic inheritrance
A: http://www.symfony-project.com/forum/index.php/m/5269/?srch=propel+inheritance#msg_5269


Author: symfonian

No Comments

No comments yet.

Comments RSS TrackBack Identifier URI

Leave a comment