1 | <?php |
||
18 | use TYPO3\CMS\Extbase\Mvc\Web\Request; |
||
19 | use TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper; |
||
20 | |||
21 | class PreviousLinkViewHelper extends AbstractFormFieldViewHelper |
||
22 | { |
||
23 | const PREVIOUS_LINK_PARAMETER = 'substepsPrevious'; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $tagName = 'input'; |
||
29 | |||
30 | /** |
||
31 | * @var FormViewHelperService |
||
32 | */ |
||
33 | protected $formService; |
||
34 | |||
35 | public function initializeArguments() |
||
40 | |||
41 | public function render() |
||
42 | { |
||
43 | /* |
||
44 | * First, we check if this view helper is called from within the |
||
45 | * `FormViewHelper`, because it would not make sense anywhere else. |
||
46 | */ |
||
47 | if (false === $this->formService->formContextExists()) { |
||
48 | // @todo |
||
49 | // throw ContextNotFoundException::substepViewHelperFormContextNotFound(); |
||
50 | } |
||
51 | |||
52 | $formObject = $this->formService->getFormObject(); |
||
53 | $formDefinition = $formObject->getDefinition(); |
||
54 | |||
55 | if (false === $formDefinition->hasSteps()) { |
||
56 | throw new \Exception('todo'); // @todo |
||
87 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: