You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 3 години
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /*
  3. * This file is part of the FOSUserBundle package.
  4. *
  5. * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Lc\SovBundle\Event;
  11. use Symfony\Component\Form\FormInterface;
  12. use Symfony\Component\HttpFoundation\Request;
  13. use Symfony\Component\HttpFoundation\Response;
  14. use Symfony\Contracts\EventDispatcher\Event;
  15. class FormEvent extends Event
  16. {
  17. /**
  18. * @var FormInterface
  19. */
  20. private $form;
  21. /**
  22. * @var Request
  23. */
  24. private $request;
  25. /**
  26. * @var Response
  27. */
  28. private $response;
  29. /**
  30. * FormEvent constructor.
  31. */
  32. public function __construct(FormInterface $form, Request $request)
  33. {
  34. $this->form = $form;
  35. $this->request = $request;
  36. }
  37. /**
  38. * @return FormInterface
  39. */
  40. public function getForm()
  41. {
  42. return $this->form;
  43. }
  44. /**
  45. * @return Request
  46. */
  47. public function getRequest()
  48. {
  49. return $this->request;
  50. }
  51. public function setResponse(Response $response)
  52. {
  53. $this->response = $response;
  54. }
  55. /**
  56. * @return Response|null
  57. */
  58. public function getResponse()
  59. {
  60. return $this->response;
  61. }
  62. }