| 1 | <?php |
||
| 21 | class FormEvent extends Event |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * the form itself |
||
| 25 | * @var FormBuilderInterface |
||
| 26 | */ |
||
| 27 | private $builder; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * the data provided by the form |
||
| 31 | * @var mixed |
||
| 32 | */ |
||
| 33 | private $data; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Initializes the event. |
||
| 37 | * |
||
| 38 | * @param FormBuilderInterface $builder |
||
| 39 | * @param mixed $data |
||
| 40 | */ |
||
| 41 | public function __construct(FormBuilderInterface $builder, $data) |
||
| 42 | { |
||
| 43 | $this->builder = $builder; |
||
| 44 | $this->data = $data; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Returns the builder. |
||
| 49 | * |
||
| 50 | * @return FormBuilderInterface |
||
| 51 | */ |
||
| 52 | public function getBuilder() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Returns the provided data. |
||
| 59 | * |
||
| 60 | * @return mixed |
||
| 61 | */ |
||
| 62 | public function getData() |
||
| 66 | } |
||
| 67 |