Archives


Master Symfony2 fundamentals

Be trained by SensioLabs experts (2 to 6 day sessions -- French or English).
trainings.sensiolabs.com

Symfony hosting done right

ServerGrove, outstanding support at the right price for your Symfony hosting needs.
servergrove.com

L'audit Qualité par SensioLabs

200 points de contrôle de votre applicatif web.
audit.sensiolabs.com

Fabien Potencier
A week of symfony #19 (08->14 may 2006)
by Fabien Potencier – May 14, 2006 – 4 comments

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

Some symfony powered websites

They talked about us

Add a Comment

You must be connected to post a comment.

Comments RSS

  • gravatar
    #1 Dustin Whittle said on the 2006/05/15 at 05:57
    I really like the new web debug toolbar...
  • gravatar
    #2 Olivier said on the 2006/05/15 at 17:31
    The new web debug toolbar is really great. I like to have the list of global variables, php config etc. Really cool!
  • gravatar
    #3 matt_m said on the 2006/05/15 at 19:30
    In this blog entry, some of the PHP code examples are not displaying properly (cf with the docs in r1342:

    list:
    filters: [date, _state]

    '',
    'open' =&gt; 'open',
    'closed' =&gt; 'closed',
    ), isset($filters['state']) ? $filters['state'] : '')) ?&gt;
  • gravatar
    #4 francois said on the 2006/05/16 at 14:10
    matt_m: thanks, we got it fixed.