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