vendor/sylius/sylius/src/Sylius/Bundle/CoreBundle/Form/Type/User/ShopUserRegistrationType.php line 21

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Sylius package.
  4.  *
  5.  * (c) Paweł Jędrzejewski
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace Sylius\Bundle\CoreBundle\Form\Type\User;
  12. use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
  13. use Symfony\Component\Form\Extension\Core\Type\PasswordType;
  14. use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
  15. use Symfony\Component\Form\FormBuilderInterface;
  16. final class ShopUserRegistrationType extends AbstractResourceType
  17. {
  18.     public function buildForm(FormBuilderInterface $builder, array $options): void
  19.     {
  20.         $builder
  21.             ->add('plainPassword'RepeatedType::class, [
  22.                 'type' => PasswordType::class,
  23.                 'first_options' => ['label' => 'sylius.form.user.password.label'],
  24.                 'second_options' => ['label' => 'sylius.form.user.password.confirmation'],
  25.                 'invalid_message' => 'sylius.user.plainPassword.mismatch',
  26.             ])
  27.         ;
  28.     }
  29.     public function getBlockPrefix(): string
  30.     {
  31.         return 'sylius_shop_user_registration';
  32.     }
  33. }