您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

74 行
1.3KB

  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. }