Ticket #536 (assigned defect)
Add call to parent::configure() in aMediaImageForm.class.php
| Reported by: | spike | Owned by: | tboutell |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.5.2 |
| Component: | apostrophePlugin: Media | Version: | 1.5 |
| Keywords: | Cc: | team@… | |
| Symfony version: | 1.4 |
Description
The only way to edit the behavior of aMediaImageForm is to override aMediaItemForm at the application level, because there is no i.e. BaseaMediaImageForm?. However, because aMediaImageForm overrides configure() but never calls parent::configure(), there is no hook into the configure method, so it isn't possible to change/unset widgets. For example, we want to de-clutter the image upload and edit form, so we want to do something like this in aMediaItemForm:
configure()
{
parent::configure();
unset($thisdescription?, $thiscategories?);
}
Solve this by putting a call to parent::configure() in aMediaImageForm::configure().

