Skip to content
Permalink
Browse files

Make entry_options configurable via schema

  • Loading branch information...
flack committed May 3, 2019
1 parent 35e1766 commit 59ab04a0eef30025c5a0b907a0df898e043d6725
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/midcom/datamanager/extension/type/subformType.php
@@ -55,10 +55,10 @@ public function configureOptions(OptionsResolver $resolver)
return $validation;
});
$resolver->setNormalizer('entry_options', function (Options $options, $value) {
return [
return array_replace([
'required' => false, //@todo no idea why this is necessary
'widget_config' => $options['widget_config']
];
], (array) $value);
});
$resolver->setNormalizer('widget_config', function (Options $options, $value) {
if (!array_key_exists('sortable', $value)) {
@@ -73,7 +73,7 @@ public function configureOptions(OptionsResolver $resolver)
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->addEventSubscriber(new ResizeFormListener($options['entry_type'], ['widget_config' => $options['widget_config']]));
$builder->addEventSubscriber(new ResizeFormListener($options['entry_type'], $options['entry_options']));
$head = midcom::get()->head;
$head->enable_jquery();

0 comments on commit 59ab04a

Please sign in to comment.
You can’t perform that action at this time.