<?php
declare(strict_types=1);
namespace Juki\Bundle\AppBundle\EventListener;
use Doctrine\ORM\EntityRepository;
use Hitso\Bundle\FormBundle\Event\FormEvent;
use Hitso\Bundle\TaggingBundle\Entity\Tag;
use Juki\Bundle\AppBundle\Entity\Dictionary\Shop;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Validator\Constraints\Length;
/**
* Class ContentCategorySubscriber
*
* @package Juki\Bundle\AppBundle\EventListener
*/
final class ContentCategorySubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return [
'content_category.form_init' => 'onCategoryFormInit',
];
}
public function onCategoryFormInit(FormEvent $event)
{
$builder = $event->getBuilder();
// $builder->add('shopType',
// ChoiceType::class, [
// 'label' => 'Rodzaj sklepu',
// 'choices' => [
// 'ISM' => Shop::ISM_SYMBOL,
// 'HSM' => Shop::HSM_SYMBOL,
// ],
// 'empty_data' => Shop::ISM_SYMBOL,
// 'required' => true,
// 'position' => ['after' => 'slug'],
// ]
// );
}
}