vendor/symfony/form/Extension/Core/Type/SubmitType.php line 24

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.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 Symfony\Component\Form\Extension\Core\Type;
  11. use Symfony\Component\Form\AbstractType;
  12. use Symfony\Component\Form\FormInterface;
  13. use Symfony\Component\Form\FormView;
  14. use Symfony\Component\Form\SubmitButtonTypeInterface;
  15. /**
  16.  * A submit button.
  17.  *
  18.  * @author Bernhard Schussek <bschussek@gmail.com>
  19.  */
  20. class SubmitType extends AbstractType implements SubmitButtonTypeInterface
  21. {
  22.     public function buildView(FormView $viewFormInterface $form, array $options)
  23.     {
  24.         $view->vars['clicked'] = $form->isClicked();
  25.     }
  26.     /**
  27.      * {@inheritdoc}
  28.      */
  29.     public function getParent()
  30.     {
  31.         return __NAMESPACE__.'\ButtonType';
  32.     }
  33.     /**
  34.      * {@inheritdoc}
  35.      */
  36.     public function getBlockPrefix()
  37.     {
  38.         return 'submit';
  39.     }
  40. }