Permalink
Browse files

correct filter list

  • Loading branch information...
1 parent 5d9a284 commit 2496c8cfd9883165d03be3a908f84b805ddcaf14 @philippe-levan philippe-levan committed Oct 20, 2011
Showing with 7 additions and 3 deletions.
  1. +6 −2 Controller/BlockController.php
  2. +1 −1 Form/Block/StandardForm.php
@@ -225,8 +225,12 @@ public function editAction(Block $block)
$formChildren = $form->getChildren();
$blockData = $block->getData();
- foreach($formData->methodApplyToField() as $field => $method) {
- $blockData['root'][$field] = $blockManager->$method($blockData['root'][$field]);
+
+ $reflector = new \ReflectionObject($formData);
+ if ($reflector->hasMethod('filterList')) {
+ foreach($formData->filterList() as $field => $method) {
+ $blockData['root'][$field] = $blockManager->$method($blockData['root'][$field]);
+ }
}
$block->setData($blockData);
@@ -72,7 +72,7 @@ public function buildForm(FormBuilder $builder, array $options)
);
}
- public function methodApplyToField() {
+ public function filterList() {
return array(
'subContent' => 'stripTagText'
);

0 comments on commit 2496c8c

Please sign in to comment.