/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $limit = $options['field_options']['limit']; $builder->add('text', 'sonata_formatter_type', ['event_dispatcher' => $builder->getEventDispatcher(), 'format_field' => 'format', 'source_field' => 'text', 'source_field_options' => ['attr' => ['class' => 'span10', 'rows' => 20]], 'listener' => true, 'target_field' => 'text', 'ckeditor_context' => 'default', 'label' => false, 'attr' => ['data-limit' => $limit]]); }
/** * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('name')->add('content', 'sonata_formatter_type', ['event_dispatcher' => $builder->getEventDispatcher(), 'format_field' => 'contentFormatter', 'source_field' => 'rawContent', 'source_field_options' => ['attr' => ['class' => 'span10', 'rows' => 20]], 'listener' => true, 'target_field' => 'content'])->add('date', 'date', ['label' => 'Jahr']); }
/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->getEventDispatcher()->removeSubscriber($this->oldTagSubscriber); $builder->addEventSubscriber($this->newTagSubscriber); }