Browse Source

User : gestion inscription

develop
Guillaume 3 years ago
parent
commit
5f774f1db3
3 changed files with 92 additions and 0 deletions
  1. +73
    -0
      Event/FormEvent.php
  2. +12
    -0
      Event/User/UserEvent.php
  3. +7
    -0
      Resources/translations/admin.fr.yaml

+ 73
- 0
Event/FormEvent.php View File

@@ -0,0 +1,73 @@
<?php

/*
* This file is part of the FOSUserBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Lc\SovBundle\Event;

use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Contracts\EventDispatcher\Event;

class FormEvent extends Event
{
/**
* @var FormInterface
*/
private $form;

/**
* @var Request
*/
private $request;

/**
* @var Response
*/
private $response;

/**
* FormEvent constructor.
*/
public function __construct(FormInterface $form, Request $request)
{
$this->form = $form;
$this->request = $request;
}

/**
* @return FormInterface
*/
public function getForm()
{
return $this->form;
}

/**
* @return Request
*/
public function getRequest()
{
return $this->request;
}

public function setResponse(Response $response)
{
$this->response = $response;
}

/**
* @return Response|null
*/
public function getResponse()
{
return $this->response;
}
}

+ 12
- 0
Event/User/UserEvent.php View File

@@ -0,0 +1,12 @@
<?php

namespace Lc\SovBundle\Event\User;

use Lc\SovBundle\Event\FormEvent;

class UserEvent extends FormEvent
{
const REGISTRATION_SUCCESS = 'user.registration.success';
const REGISTRATION_FAILURE = 'user.registration.failure';

}

+ 7
- 0
Resources/translations/admin.fr.yaml View File

@@ -132,6 +132,9 @@ entity:
quantity: Quantité
unit: Unité
phone: Téléphone
genderChoices:
madame: Madame
monsieur: Monsieur
panels:
general: Général
configuration: Configuration
@@ -149,3 +152,7 @@ form:
message:
success: Votre mot de passe a bien été modifié
invalid_passwords: Les deux mots de passe ne correspondent pas.
register:
password: Mot de passe
password_confirmation: Répéter le mot de passe
password_mismatch: Les deux mots de passe ne sont pas identiques

Loading…
Cancel
Save