From 4f5b44bd3bd490309eb2ba7b44df4769816ba729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 3 Aug 2013 19:26:54 +0200 Subject: twig implementation --- .../form/Symfony/Component/Form/FormEvent.php | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 vendor/symfony/form/Symfony/Component/Form/FormEvent.php (limited to 'vendor/symfony/form/Symfony/Component/Form/FormEvent.php') 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 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form; + +use Symfony\Component\EventDispatcher\Event; + +/** + * @author Bernhard Schussek + */ +class FormEvent extends Event +{ + private $form; + protected $data; + + /** + * Constructs an event. + * + * @param FormInterface $form The associated form + * @param mixed $data The data + */ + public function __construct(FormInterface $form, $data) + { + $this->form = $form; + $this->data = $data; + } + + /** + * Returns the form at the source of the event. + * + * @return FormInterface + */ + public function getForm() + { + return $this->form; + } + + /** + * Returns the data associated with this event. + * + * @return mixed + */ + public function getData() + { + return $this->data; + } + + /** + * Allows updating with some filtered data. + * + * @param mixed $data + */ + public function setData($data) + { + $this->data = $data; + } +} -- cgit v1.2.3