add changes
This commit is contained in:
parent
7fb0614db4
commit
82575d2da0
2 changed files with 3 additions and 2 deletions
|
@ -8,6 +8,7 @@ use Doctrine\ORM\QueryBuilder;
|
||||||
use Override;
|
use Override;
|
||||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use Symfony\Component\Validator\Constraints\Length;
|
use Symfony\Component\Validator\Constraints\Length;
|
||||||
|
@ -23,7 +24,7 @@ final class MenuItemType extends AbstractType
|
||||||
$item = $options['data'];
|
$item = $options['data'];
|
||||||
assert($item instanceof MenuItem);
|
assert($item instanceof MenuItem);
|
||||||
|
|
||||||
$builder->add('name', \Symfony\Component\Form\Extension\Core\Type\TextType::class, [
|
$builder->add('name', TextType::class, [
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new NotBlank,
|
new NotBlank,
|
||||||
new Length([
|
new Length([
|
||||||
|
|
|
@ -4,10 +4,10 @@ namespace App\Repository;
|
||||||
|
|
||||||
use App\Entity\MenuItem;
|
use App\Entity\MenuItem;
|
||||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\ORM\QueryBuilder;
|
||||||
use Doctrine\Persistence\ManagerRegistry;
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
use Symfony\Bridge\Doctrine\Types\UlidType;
|
use Symfony\Bridge\Doctrine\Types\UlidType;
|
||||||
use Symfony\Component\Uid\Ulid;
|
use Symfony\Component\Uid\Ulid;
|
||||||
use Doctrine\ORM\QueryBuilder;
|
|
||||||
|
|
||||||
use function array_map;
|
use function array_map;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue