‪TYPO3CMS  9.5
SubmitViewHelper.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
46 {
50  protected ‪$tagName = 'input';
51 
55  public function ‪initializeArguments()
56  {
57  parent::initializeArguments();
58  $this->registerTagAttribute(
59  'disabled',
60  'string',
61  'Specifies that the input element should be disabled when the page loads'
62  );
63  $this->registerUniversalTagAttributes();
64  }
65 
71  public function ‪render()
72  {
73  $name = $this->‪getName();
75 
76  $this->tag->addAttribute('type', 'submit');
77  $this->tag->addAttribute('value', $this->‪getValueAttribute());
78  if (!empty($name)) {
79  $this->tag->addAttribute('name', $name);
80  }
81 
82  return $this->tag->render();
83  }
84 }
‪TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper\render
‪string render()
Definition: SubmitViewHelper.php:70
‪TYPO3\CMS\Fluid\ViewHelpers\Form
Definition: AbstractFormFieldViewHelper.php:2
‪TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper\$tagName
‪string $tagName
Definition: SubmitViewHelper.php:49
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper\registerFieldNameForFormTokenGeneration
‪registerFieldNameForFormTokenGeneration($fieldName)
Definition: AbstractFormViewHelper.php:101
‪TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper\initializeArguments
‪initializeArguments()
Definition: SubmitViewHelper.php:54
‪TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper
Definition: SubmitViewHelper.php:46
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
Definition: AbstractFormFieldViewHelper.php:26
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper\getName
‪string getName()
Definition: AbstractFormFieldViewHelper.php:86
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper\getValueAttribute
‪mixed getValueAttribute()
Definition: AbstractFormFieldViewHelper.php:147