diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-03 19:26:54 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-03 19:26:54 +0200 |
commit | 4f5b44bd3bd490309eb2ba7b44df4769816ba729 (patch) | |
tree | 6cefe170dfe0a5a361cb1e2d1fc4d580a3316d02 /vendor/symfony/form/Symfony/Component/Form/FormEvent.php | |
parent | 2b840e0cfb63a453bea67a98541f3df9c273c5f5 (diff) | |
download | wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.tar.gz wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.tar.zst wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.zip |
twig implementation
Diffstat (limited to 'vendor/symfony/form/Symfony/Component/Form/FormEvent.php')
-rw-r--r-- | vendor/symfony/form/Symfony/Component/Form/FormEvent.php | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/vendor/symfony/form/Symfony/Component/Form/FormEvent.php b/vendor/symfony/form/Symfony/Component/Form/FormEvent.php new file mode 100644 index 00000000..57cebade --- /dev/null +++ b/vendor/symfony/form/Symfony/Component/Form/FormEvent.php | |||
@@ -0,0 +1,65 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Form; | ||
13 | |||
14 | use Symfony\Component\EventDispatcher\Event; | ||
15 | |||
16 | /** | ||
17 | * @author Bernhard Schussek <bschussek@gmail.com> | ||
18 | */ | ||
19 | class FormEvent extends Event | ||
20 | { | ||
21 | private $form; | ||
22 | protected $data; | ||
23 | |||
24 | /** | ||
25 | * Constructs an event. | ||
26 | * | ||
27 | * @param FormInterface $form The associated form | ||
28 | * @param mixed $data The data | ||
29 | */ | ||
30 | public function __construct(FormInterface $form, $data) | ||
31 | { | ||
32 | $this->form = $form; | ||
33 | $this->data = $data; | ||
34 | } | ||
35 | |||
36 | /** | ||
37 | * Returns the form at the source of the event. | ||
38 | * | ||
39 | * @return FormInterface | ||
40 | */ | ||
41 | public function getForm() | ||
42 | { | ||
43 | return $this->form; | ||
44 | } | ||
45 | |||
46 | /** | ||
47 | * Returns the data associated with this event. | ||
48 | * | ||
49 | * @return mixed | ||
50 | */ | ||
51 | public function getData() | ||
52 | { | ||
53 | return $this->data; | ||
54 | } | ||
55 | |||
56 | /** | ||
57 | * Allows updating with some filtered data. | ||
58 | * | ||
59 | * @param mixed $data | ||
60 | */ | ||
61 | public function setData($data) | ||
62 | { | ||
63 | $this->data = $data; | ||
64 | } | ||
65 | } | ||