Development

SymfonyWeek19

You must first sign up to be able to contribute.

Version 5 (modified by fabien, 12 years ago)
--

A week of symfony #19 (08->14 may 2006)

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