nothing more than YAML syntax validation. YAML is ubiquitous in symfony,
and yet config files are just dumped into arrays and symfony hopes for
the best, yielding cryptic offset notices and errors that dont even give
the yaml file in question!
i realize that this is a spyc issue (it's a VERY primitive yaml parser),
and nothing better seems to be on the horizon for php (i dont see syntax
checking/exception handling on the roadmap for syck).
pyyaml apparently offers a nice parser that's been ported to ruby.
anyone know python and care to port it to symfony? :)
cheers,
-eric
Martin Kreidenweis wrote:
> Hi.
>
>> - I would be nice to have more custom type form fields in the backend.
>> For Example, if I have a Int field in a Model DB-Table and I want it to carry
>> just digits from 1 - 6 (a Rating), I cannot render it to a select field
>> without
>> making a new (Model) class for just this one Table-field. A bit to much
>> overhead for not even a byte of information IMHO.
>
> You could write a object_select_rating_tag helper like that instead:
>
> function select_rating_tag($name, $selected, $options) {
> return select_tag($name, options_for_select(range(1, 6), $selected));
> }
>
> function object_select_rating_tag($object, $method, $options = array(),
> $default_value = null)
> {
> $options = _parse_attributes($options);
>
> $value = _get_object_value($object, $method, $default_value);
>
> return select_rating_tag(_convert_method_to_name($method, $options),
> $value, $options);
> }
>
> Then just set the edit control type in your generator.yml to
> select_rating_tag for the respective field.
>
> Or if you have no need to reuse the code simply put it in a partial.
>
> Martin
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---