예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $propertiesForm = $builder->create('properties', FormType::class)->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]);
     $builder->add($propertiesForm);
     $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
         $block = $event->getData();
         $form = $event->getForm();
         // @todo: Replace with a nice getDefaultOptions method
         $properties = $block->getProperties();
         if (!count($properties)) {
             $properties['styles'] = array();
             $cols = array_merge(array(array_fill(0, $block->getColumnCount(), 12 / $block->getColumnCount())), array_fill(0, 3, array_fill(0, $block->getColumnCount(), null)));
             $keys = array('xs', 'sm', 'md', 'lg');
             $properties['spans'] = array_combine($keys, $cols);
             $properties['offsets'] = array_combine($keys, array_fill(0, 4, array_fill(0, $block->getColumnCount(), null)));
             $properties['gutters'] = array_combine($keys, $cols);
             $block->setProperties($properties);
         }
         $form->get('properties')->add('styles', ChoiceType::class, ['label' => 'label.styling', 'choices' => $this->config['styles'], 'required' => false, 'expanded' => true, 'multiple' => true, 'attr' => ['help_text' => 'help.html_styles']]);
         $form->get('properties')->add('spans', SpanCollectionType::class, ['column_count' => $block->getColumnCount(), 'label' => 'label.spans', 'attr' => ['help_text' => 'help.column_spans']]);
         $form->get('properties')->add('offsets', SpanCollectionType::class, ['column_count' => $block->getColumnCount(), 'label' => 'label.offsets', 'attr' => ['help_text' => 'help.column_offsets']]);
         $form->get('properties')->add('gutters', GutterCollectionType::class, ['column_count' => $block->getColumnCount(), 'label' => 'label.gutters', 'attr' => ['help_text' => 'help.column_gutters']]);
     });
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     // Default panel
     $builder->add($builder->create('default', FormType::Class, ['inherit_data' => true])->add('loginContentItem', ContentPickerType::class, ['label' => 'label.login_content_item'])->add('registrationContentItem', ContentPickerType::class, ['label' => 'label.register_content_item']));
     $builder->add($builder->create('properties', FormType::class)->add('loginUrl', TextType::class, ['label' => 'label.login_url'])->add('registrationUrl', TextType::class, ['label' => 'label.registration_url']));
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $builder->add($builder->create('default', FormType::Class, ['inherit_data' => true])->add('header', CKEditorType::class, ['label' => 'label.header', 'attr' => ['label_col' => 12, 'widget_col' => 12]])->add('footer', CKEditorType::class, ['label' => 'label.footer', 'attr' => ['label_col' => 12, 'widget_col' => 12]]));
     $propertiesForm = $builder->create('properties', FormType::Class)->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]);
     $propertiesForm->add('styles', ChoiceType::class, ['label' => 'label.styling', 'choices' => $this->config['styles'], 'required' => false, 'expanded' => true, 'multiple' => true, 'attr' => ['help_text' => 'help.html_styles']]);
     $builder->add($propertiesForm);
 }
예제 #4
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $propertiesForm = $builder->create('properties', FormType::class)->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]);
     if (isset($this->config['templates'])) {
         $propertiesForm->add('template', ChoiceType::class, ['label' => 'label.template', 'placeholder' => 'placeholder.choice_optional', 'attr' => ['help_text' => 'help.block_template'], 'choices' => $this->config['templates'], 'required' => false]);
     }
     $builder->add($builder->create('default', FormType::class, ['virtual' => true])->add('value', MediaPickerType::class, ['to_json' => true, 'multiple' => true, 'label' => 'label.media']))->add($propertiesForm);
 }
예제 #5
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $propertiesForm = $builder->create('properties', FormType::class)->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]);
     if ($this->config['styles']) {
         $propertiesForm->add('styles', 'choice', ['label' => 'label.styling', 'choices' => array_combine($this->config['styles'], $this->config['styles']), 'required' => false, 'expanded' => true, 'multiple' => true, 'attr' => ['help_text' => 'help.html_styles']]);
     }
     $builder->add($builder->create('default', FormType::class, ['inherit_data' => true])->add('media', MediaPickerType::class, ['required' => false, 'multiple' => false])->add('value', CKEditorType::class, ['label' => 'label.rich_text', 'attr' => ['label_col' => 12, 'widget_col' => 12]]))->add($propertiesForm);
 }
예제 #6
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $propertiesForm = $builder->create('properties', FormType::class, ['label' => false, 'attr' => ['widget_col' => 12]]);
     if (isset($this->config['templates'])) {
         $propertiesForm->add('template', ChoiceType::class, ['label' => 'label.template', 'placeholder' => 'placeholder.choice_optional', 'attr' => ['help_text' => 'help.block_template'], 'choices' => $this->config['templates'], 'required' => false]);
     }
     $builder->add($builder->create('default', FormType::class, ['virtual' => true])->add('form', EntityType::class, ['class' => 'OpiferCmsBundle:Form', 'choice_label' => 'name', 'label' => 'Form', 'placeholder' => 'Choose Form'])->add($propertiesForm));
 }
예제 #7
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $propertiesForm = $builder->create('properties', FormType::class)->add('url', TextType::class, ['label' => 'label.url'])->add('target', ChoiceType::class, ['label' => 'label.target', 'choices' => ['_blank' => '_blank', '_self' => '_self'], 'required' => false])->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]);
     if ($this->config['styles']) {
         $propertiesForm->add('styles', ChoiceType::class, ['label' => 'label.styling', 'choices' => array_combine($this->config['styles'], $this->config['styles']), 'required' => false, 'expanded' => true, 'multiple' => true]);
     }
     $builder->add($builder->create('default', FormType::class, ['inherit_data' => true])->add('value', TextType::class, ['label' => 'label.label']))->add($propertiesForm);
 }
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $propertiesForm = $builder->create('properties', FormType::class);
     if (count($this->config['templates'])) {
         // Default panel
         $builder->add($propertiesForm->add('template', ChoiceType::class, ['label' => 'label.template', 'placeholder' => 'placeholder.choice_optional', 'attr' => ['help_text' => 'help.block_template'], 'choices' => $this->config['templates'], 'required' => false]));
     }
 }
예제 #9
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $propertiesForm = $builder->create('properties', FormType::class);
     $builder->add($propertiesForm->add('url', TextType::class, ['attr' => ['help_text' => 'help.iframe_url']])->add('width', TextType::class, ['attr' => []])->add('height', TextType::class, ['attr' => []]))->add($propertiesForm->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]));
     if ($this->config['styles']) {
         $propertiesForm->add('styles', ChoiceType::class, ['label' => 'label.styling', 'choices' => $this->config['styles'], 'required' => false, 'expanded' => true, 'multiple' => true, 'attr' => ['help_text' => 'help.html_styles']]);
     }
 }
예제 #10
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $showContentPicker = false;
     if ($options['data'] && $options['data']->getValue() == NavigationBlock::CHOICE_CUSTOM) {
         $showContentPicker = true;
     }
     // Default panel
     $builder->add($builder->create('default', FormType::class, ['virtual' => true])->add('value', ChoiceType::class, ['label' => 'label.navigation_block_value', 'choices' => ['Top level pages' => NavigationBlock::CHOICE_TOP_LEVEL, 'Custom selection' => NavigationBlock::CHOICE_CUSTOM], 'choices_as_values' => true, 'attr' => ['class' => 'toggle-content-picker']])->add($builder->create('properties', FormType::class, ['label' => false, 'attr' => ['widget_col' => 12]])->add('content', ContentListPickerType::class, ['label' => 'label.custom', 'attr' => ['widget_col' => 9, 'form_group' => ['styles' => $showContentPicker === false ? 'display:none;' : '']]])->add('levels', ChoiceType::class, ['label' => 'label.levels', 'choices' => [1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5], 'attr' => ['help_text' => 'help.levels', 'widget_col' => 9]])->add('template', ChoiceType::class, ['label' => 'label.template', 'attr' => ['help_text' => 'help.block_template', 'widget_col' => 9], 'choices' => $this->config['templates'], 'required' => true])));
 }
예제 #11
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $propertiesForm = $builder->create('properties', FormType::class)->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]);
     if (isset($this->config['templates'])) {
         $propertiesForm->add('template', ChoiceType::class, ['label' => 'label.template', 'placeholder' => 'placeholder.choice_optional', 'attr' => ['help_text' => 'help.block_template'], 'choices' => $this->config['templates'], 'required' => false]);
     }
     // Default panel
     $builder->add($builder->create('default', FormType::class, ['inherit_data' => true])->add('value', CKEditorType::class, ['label' => 'label.rich_text', 'attr' => ['label_col' => 12, 'widget_col' => 12]]))->add($propertiesForm);
 }
예제 #12
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $propertiesForm = $builder->create('properties', FormType::class)->add('template', ChoiceType::class, ['label' => 'label.template', 'attr' => ['help_text' => 'help.block_template'], 'choices' => $this->config['templates'], 'required' => true])->add('tabs', BootstrapCollectionType::class, ['label' => 'label.tabs', 'allow_add' => true, 'allow_delete' => true, 'entry_type' => TextType::class])->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]);
     if ($this->config['styles']) {
         $propertiesForm->add('styles', ChoiceType::class, ['label' => 'label.styling', 'choices' => $this->config['styles'], 'required' => false, 'expanded' => true, 'multiple' => true, 'attr' => ['help_text' => 'help.html_styles']]);
     }
     // Default panel
     $builder->add($propertiesForm);
 }
예제 #13
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $propertiesForm = $builder->create('properties', FormType::class)->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]);
     // Default panel
     $builder->add($builder->create('default', FormType::class, ['virtual' => true])->add('title', 'text', ['label' => 'label.title'])->add('value', ContentListPickerType::class, ['label' => 'label.content']))->add($propertiesForm->add('template', ChoiceType::class, ['label' => 'label.template', 'placeholder' => 'placeholder.choice_optional', 'attr' => ['help_text' => 'help.block_template'], 'choices' => $this->config['templates'], 'required' => false]));
     if ($this->config['styles']) {
         $propertiesForm->add('styles', ChoiceType::class, ['label' => 'label.styling', 'choices' => $this->config['styles'], 'required' => false, 'expanded' => true, 'multiple' => true, 'attr' => ['help_text' => 'help.html_styles']]);
     }
 }
예제 #14
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $propertiesForm = $builder->create('properties', FormType::class)->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]);
     $builder->add($propertiesForm);
     $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
         $block = $event->getData();
         $form = $event->getForm();
         $form->get('properties')->add('styles', ChoiceType::class, ['label' => 'label.styling', 'choices' => $this->config['styles'], 'required' => false, 'expanded' => true, 'multiple' => true, 'attr' => ['help_text' => 'help.html_styles']]);
         $form->get('properties')->add('container_size', ChoiceType::class, ['label' => 'label.container_sizing', 'choices' => ['fluid' => 'label.container_fluid', '' => 'label.container_fixed', 'smooth' => 'label.container_smooth'], 'required' => true, 'attr' => ['help_text' => 'help.container_sizing']]);
     });
 }
예제 #15
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $builder->addEventListener(FormEvents::PRE_SET_DATA, array($this, 'onPreSetData'));
     $builder->addEventListener(FormEvents::SUBMIT, array($this, 'onSubmit'));
     $builder->addEventListener(FormEvents::POST_SET_DATA, array($this, 'onPostSetData'));
     $propertiesForm = $builder->create('properties', FormType::class)->add('template', ChoiceType::class, ['label' => 'label.template', 'attr' => ['help_text' => 'help.block_template'], 'choices' => $this->config['templates'], 'required' => true])->add('tabs', BootstrapCollectionType::class, ['label' => 'label.tabs', 'allow_add' => true, 'allow_delete' => true, 'entry_type' => TabType::class, 'sub_widget_col' => 8, 'button_col' => 4, 'attr' => ['class' => 'sortable-tabnav'], 'options' => ['attr' => ['style' => 'inline']]])->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]);
     if ($this->config['styles']) {
         $propertiesForm->add('styles', ChoiceType::class, ['label' => 'label.styling', 'choices' => $this->config['styles'], 'required' => false, 'expanded' => true, 'multiple' => true, 'attr' => ['help_text' => 'help.html_styles']]);
     }
     // Default panel
     $builder->add($propertiesForm);
 }
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     // Default panel
     $builder->add($builder->create('properties', FormType::class)->add('mailingLists', EntityType::class, ['required' => false, 'label' => 'label.mailinglist', 'class' => 'OpiferMailingListBundle:MailingList', 'choice_label' => 'displayName', 'expanded' => true, 'multiple' => true, 'query_builder' => function (EntityRepository $repository) {
         return $repository->createQueryBuilder('m')->add('orderBy', 'm.displayName ASC');
     }, 'attr' => ['help_text' => 'help.subscribe_mailinglist']])->add('responseType', ChoiceType::class, ['choices' => ['message' => 'label.subscribe_choice_response_message', 'redirect' => 'label.subscribe_choice_response_page'], 'required' => true, 'label' => 'label.subscribe_response_message', 'expanded' => true, 'multiple' => false])->add('responseMessage', CKEditorType::class, ['label' => 'label.subscribe_response_message'])->add('responseContent', ContentPickerType::class, ['label' => 'label.subscribe_response_page'])->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]));
     $builder->get('properties')->get('mailingLists')->addModelTransformer(new MailingListToArrayTransformer($this->em));
     $contentManager = $this->contentManager;
     $builder->get('properties')->get('responseContent')->addModelTransformer(new CallbackTransformer(function ($contentId) use($contentManager) {
         if (!$contentId || empty($contentId) || !is_int($contentId)) {
             return;
         }
         return $contentManager->getRepository()->find($contentId);
     }, function ($content) {
         if ($content && $content instanceof ContentInterface) {
             return $content->getId();
         }
         return;
     }));
 }
예제 #17
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $builder->add($builder->create('default', FormType::class, ['virtual' => true]))->add($builder->create('properties', FormType::class)->add('limit', IntegerType::class, ['label' => 'label.limit', 'attr' => ['help_text' => 'help.limit']]));
 }
예제 #18
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $builder->add($builder->create('default', FormType::class, ['virtual' => true])->add('title', TextType::class, ['label' => 'label.title'])->add('value', CKEditorType::class, ['label' => 'label.caption'])->add('media', MediaPickerType::class, ['required' => false, 'multiple' => false, 'attr' => array('label_col' => 12, 'widget_col' => 12)]));
     $builder->add($builder->create('properties', FormType::class)->add('width', TextType::class, ['label' => 'label.width'])->add('height', TextType::class, ['label' => 'label.height']));
 }
예제 #19
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     // Default panel
     $builder->add($builder->create('properties', FormType::class)->add('conditions', ExpressionEngineType::class, ['prototypes' => $this->getPrototypes()])->add('order_by', ChoiceType::class, ['label' => 'Order by', 'choices' => ['Creation Date' => 'createdAt', 'Title' => 'title'], 'choices_as_values' => true])->add('order_direction', ChoiceType::class, ['label' => 'Order direction', 'choices' => ['Ascending' => 'ASC', 'Descending' => 'DESC'], 'choices_as_values' => true])->add('limit', IntegerType::class)->add('template', ChoiceType::class, ['label' => 'label.template', 'placeholder' => 'placeholder.choice_optional', 'attr' => ['help_text' => 'help.block_template'], 'choices' => $this->config['templates'], 'required' => false]));
 }
예제 #20
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $builder->add($builder->create('default', FormType::class, ['virtual' => true])->add('value', MediaPickerType::class, ['to_json' => true, 'multiple' => true, 'label' => 'label.content']));
 }
예제 #21
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $builder->add($builder->create('default', FormType::class, ['virtual' => true])->add('form', EntityType::class, ['class' => 'OpiferCmsBundle:Form', 'choice_label' => 'name', 'label' => 'Form', 'placeholder' => 'Choose Form']));
 }
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     // Default panel
     $builder->add($builder->create('default', FormType::class, ['virtual' => true])->add('value', ContentTreePickerType::class));
 }
예제 #23
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     // Default panel
     $builder->add($builder->create('default', FormType::class, ['virtual' => true])->add('media', MediaPickerType::class, ['required' => false, 'multiple' => false, 'attr' => array('label_col' => 12, 'widget_col' => 12)]))->add($builder->create('properties', FormType::class)->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']])->add('filter', ChoiceType::class, ['choices' => $this->getAvailableFilters(), 'choices_as_values' => true, 'attr' => ['help_text' => 'help.image_filter']])->add('enlarge', ChoiceType::class, ['choices' => ['No' => false, 'Yes' => true], 'choices_as_values' => true, 'attr' => ['help_text' => 'help.image_enlarge']])->add('enlarge_filter', ChoiceType::class, ['choices' => $this->getAvailableFilters(), 'choices_as_values' => true, 'required' => false, 'attr' => ['help_text' => 'help.image_enlarge_filter']])->add('styles', ChoiceType::class, ['label' => 'label.styling', 'choices' => $this->config['styles'], 'required' => false, 'expanded' => true, 'multiple' => true, 'attr' => ['help_text' => 'help.html_styles']]));
 }
예제 #24
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $builder->add($builder->create('default', FormType::class, ['virtual' => true])->add('value', CKEditorType::class, ['label' => 'label.message']));
 }
예제 #25
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     // Default panel
     $builder->add($builder->create('default', FormType::class, ['inherit_data' => true])->add('value', CKEditorType::class, ['label' => 'label.rich_text', 'attr' => ['label_col' => 12, 'widget_col' => 12]]))->add($builder->create('properties', FormType::class)->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']]));
 }
예제 #26
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     $builder->add($builder->create('default', FormType::class, ['virtual' => true])->add('value', CKEditorType::class, ['label' => 'label.message']));
     $builder->add($builder->create('properties', FormType::class)->add('redirect_content', ContentPickerType::class, ['label' => 'label.login_redirect_content_item', 'as_object' => false])->add('register_content', ContentPickerType::class, ['label' => 'label.register_content_item', 'as_object' => false]));
 }
예제 #27
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     // Default panel
     $builder->add($builder->create('properties', FormType::class)->add('order_by', ChoiceType::class, ['label' => 'Order by', 'choices' => ['Creation Date' => 'createdAt', 'Title' => 'title'], 'choices_as_values' => true])->add('order_direction', ChoiceType::class, ['label' => 'Order direction', 'choices' => ['Ascending' => 'ASC', 'Descending' => 'DESC'], 'choices_as_values' => true])->add('limit', IntegerType::class));
 }
예제 #28
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     // Default panel
     $builder->add($builder->create('default', FormType::class, ['inherit_data' => true])->add('value', TextareaType::class, ['label' => 'label.code', 'attr' => ['label_col' => 12, 'widget_col' => 12, 'help_text' => 'help.javascript_code']]));
 }
예제 #29
0
 /**
  * {@inheritdoc}
  */
 public function buildManageForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildManageForm($builder, $options);
     // Default panel
     $builder->add($builder->create('properties', FormType::class)->add('id', TextType::class, ['attr' => ['help_text' => 'help.html_id']])->add('extra_classes', TextType::class, ['attr' => ['help_text' => 'help.extra_classes']])->add('show_indicators', ChoiceType::class, ['choices' => ['Yes' => true, 'No' => false], 'choices_as_values' => true])->add('show_controls', ChoiceType::class, ['choices' => ['Yes' => true, 'No' => false], 'choices_as_values' => true]));
 }