Przeglądaj źródła

User : gestion inscription

develop
Guillaume 3 lat temu
rodzic
commit
5f774f1db3
3 zmienionych plików z 92 dodań i 0 usunięć
  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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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

Ładowanie…
Anuluj
Zapisz