symfony-cmf / block-bundle

Extends the SonataBlockBundle to integrate with PHPCR ODM
https://cmf.symfony.com
20 stars 51 forks source link

filter should be set on a slideshow #126

Open lsmith77 opened 11 years ago

lsmith77 commented 11 years ago

the imagine filter has to be set on the image. this is obviously quite flexible but makes administration needlessly hard. ideally one could set a default filter for a given slideshow on the slideshow itself.

dbu commented 11 years ago

i think the reason why we did not do that right away was because the slideshow could also have other things. but imo having an imagineFilter field should be fine, other blocks will simply ignore that.

the filter should be optional, selected from a dropdown that is configured through bundle configuration with a list of filter system names and filter display names. if the configuration is empty, no dropdown should be shown at all imho.

ElectricMaxxx commented 11 years ago

i will take this one to make my first try for a PR. only for my head: add filter property to the SlideshowModel (maybe with a validation for existing/declared filter?) add a dropdown list to the formMapper in the controller if there are filter declared add a label/display property to the filter config (locale depending?)

dbu commented 11 years ago

add a label/display property to the filter config (locale depending?)

the filter will not depend on locale, but the sonata admin label should be in the translation file (sonata automatically puts label.field_filter or something, check the other forms and translations)

one more step will be to inherit the filter name to the imagine blocks when rendering. i wonder if we can only do it if the imagine blocks themselves have no explicit filter, to allow overriding...

ElectricMaxxx commented 11 years ago

Is there a way to extend/append the existing imagine filter setting? By this i would prefer a own setting for the SlideshowBlock.