‪TYPO3CMS  ‪main
SubmitViewHelper.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
49 {
53  protected ‪$tagName = 'input';
54 
55  public function ‪initializeArguments(): void
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 
66  public function ‪render(): string
67  {
68  $name = $this->‪getName();
70 
71  $this->tag->addAttribute('type', 'submit');
72  $this->tag->addAttribute('value', $this->‪getValueAttribute());
73  if (!empty($name)) {
74  $this->tag->addAttribute('name', $name);
75  }
76 
77  return $this->tag->render();
78  }
79 }
‪TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper\render
‪render()
Definition: SubmitViewHelper.php:65
‪TYPO3\CMS\Fluid\ViewHelpers\Form
Definition: AbstractFormFieldViewHelper.php:18
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper\registerFieldNameForFormTokenGeneration
‪registerFieldNameForFormTokenGeneration(string $fieldName)
Definition: AbstractFormViewHelper.php:100
‪TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper\$tagName
‪string $tagName
Definition: SubmitViewHelper.php:52
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper\getName
‪getName()
Definition: AbstractFormFieldViewHelper.php:79
‪TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper\initializeArguments
‪initializeArguments()
Definition: SubmitViewHelper.php:54
‪TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper
Definition: SubmitViewHelper.php:49
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
Definition: AbstractFormFieldViewHelper.php:37
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper\getValueAttribute
‪mixed getValueAttribute()
Definition: AbstractFormFieldViewHelper.php:147