src/Juki/Bundle/AppBundle/EventListener/ContentCategorySubscriber.php line 31

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Juki\Bundle\AppBundle\EventListener;
  4. use Doctrine\ORM\EntityRepository;
  5. use Hitso\Bundle\FormBundle\Event\FormEvent;
  6. use Hitso\Bundle\TaggingBundle\Entity\Tag;
  7. use Juki\Bundle\AppBundle\Entity\Dictionary\Shop;
  8. use Symfony\Bridge\Doctrine\Form\Type\EntityType;
  9. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  10. use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
  11. use Symfony\Component\Form\Extension\Core\Type\TextType;
  12. use Symfony\Component\Validator\Constraints\Length;
  13. /**
  14.  * Class ContentCategorySubscriber
  15.  *
  16.  * @package Juki\Bundle\AppBundle\EventListener
  17.  */
  18. final class ContentCategorySubscriber implements EventSubscriberInterface
  19. {
  20.     public static function getSubscribedEvents()
  21.     {
  22.         return [
  23.             'content_category.form_init' => 'onCategoryFormInit',
  24.         ];
  25.     }
  26.     public function onCategoryFormInit(FormEvent $event)
  27.     {
  28.         $builder $event->getBuilder();
  29. //        $builder->add('shopType',
  30. //            ChoiceType::class, [
  31. //                'label'      => 'Rodzaj sklepu',
  32. //                'choices'    => [
  33. //                    'ISM' => Shop::ISM_SYMBOL,
  34. //                    'HSM' => Shop::HSM_SYMBOL,
  35. //                ],
  36. //                'empty_data' => Shop::ISM_SYMBOL,
  37. //                'required'   => true,
  38. //                'position'   => ['after' => 'slug'],
  39. //            ]
  40. //        );
  41.     }
  42. }