A week of symfony #19 (08->14 may 2006)
May 14, 2006 • Published by Fabien Potencier
Development highlights
r1365: added a new param type to include_partial() calls in admin generator
In the admin generator, if you want to override the generated HTML for a column, you can create a partial:
/modules/movie/config/generator.yml
list: display: [id, name, _rating]
/modules/movie/templates/_partial.php
echo image_tag('/images/rating/'.$movie->getRating().'.png');
But this didn't work if you wanted to override the column for the list AND the edit AND the filters. You can now do something like that:
/modules/movie/config/generator.yml
list: display: [id, name, _rating] edit: display: [id, name, _rating]
/modules/movie/templates/_partial.php
<?php if ($type == 'list') { $options = array( 0 => 'awful', 1 => 'excellent', ); echo select_tag('movie[rating]', options_for_select($options, $movie->getRating())); } else { echo image_tag('/images/rating/'.$movie->getRating().'.png'); }
The $type variable contains list, edit or filter.
r1363: added sql queries to the web debug toolbar
r1360: added predefined categories support in sfFileValidator
In a validate.yml configuration file,
imageValidator: class: sfFileValidator mime_types: @web_images mime_types_error: Please, upload a web image
is now equivalent to
imageValidator: class: sfFileValidator mime_types: - 'image/jpeg' - 'image/pjpeg' - 'image/png' - 'image/x-png' - 'image/gif' mime_types_error: Please, upload a web image
r1352: new web debug toolbar
The web debug toolbar does not need prototype anymore, takes less space on the screen and give more information.
r1340: added partial support for custom filters in admin generator
list: filters: [date, _state] <?php echo select_tag('filters[state]', options_for_select(array( '' => '', 'open' => 'open', 'closed' => 'closed', ), isset($filters['state']) ? $filters['state'] : '')) ?>
r1339: added default sorting option to admin generator
list: sort: date # equivalent to sort: [date, asc] list: sort: [date, desc]
r1338: added position option to stylesheets configured in view.yml
stylesheets: [default: { position: first }, admin]
r1331: new absolute option to image_tag() and support for absolute HTTPS urls in image_tag() and link_to()
image_tag('logo', 'absolute=true'); link_to('symfony', '/documentation/index', array('absolute' => true));
Book and documentation
r1342: partial support for custom filters and default sorting option for admin generator
r1341: absolute paths in url and asset helpers
r1335: new "HTTP 1.1 and client-side caching" section
Etag, conditionnal GET, Vary and Cache-Control support
r1322: full rewriting of the email documentation
Wiki
- http://www.symfony-project.com/trac/wiki/SymfonyBookFrench: new french translation of the book
- http://www.symfony-project.com/trac/wiki/HowtoInitializeJavascriptWithJson
Some symfony powered websites
- FoxNews Promotions: A symfony powered website for collecting promotional entries for the Fox & Friends sweepstakes. (M2Synergies, Inc.)
- MidnightBox.com "Deal of the Day": An online store that sells one unique product daily. The store is only accessible through one its affiliates. Features include integration with USPS, UPS, FedEx?, PayPal?, and Authorize.net (M2Synergies, Inc.)
- Atorio: (German) A health portal.
- Amvest: Ajax-filled Commercial Property site with draggable floating divs, ajax updates, and an auto generated backend.
They talked about us
- 60 More AJAX Tutorials: 4 of the 60 tutorials are from the symfony documentation!
Help the Symfony project!
As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.
list:
filters: [date, _state]
'',
'open' => 'open',
'closed' => 'closed',
), isset($filters['state']) ? $filters['state'] : '')) ?>