Project

General

Profile

Actions

Task #90289

closed

AbstractViewHelper class of TYPO3 8.7 can be compatible with Fluid 3.0 with minor changes

Added by Claus Due almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2020-02-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The following changes will make AbstractViewHelper from TYPO3 8.7 compatible with Fluid 3.0:

  • A condition must be added in registerRenderMethodArguments which checks if method_exists($this, 'render') before attempting to use Reflection to fetch arguments, since render() is optional in Fluid 3.0
  • The assigning of $this->controllerContext = $this->renderingContext->getControllerContext(); must be duplicated from prepareArguments to an overridden getArguments function (since prepareArguments is not called by Fluid 3.0 when creating the instance, but getArguments will)
  • The foreach of $this->argumentDefinitions in callRenderMethod must be changed to foreach $this->prepareArguments since $this->argumentDefinitions does not exist in Fluid 3.0
  • A condition must be added in registerRenderMethodArguments which assigns the ArgumentDefinition to a temporary variable $argumentDefinition and if ($this->arguments instanceof ArgumentCollection), call $this->arguments->addDefinition($argumentDefinition). Otherwise, assign into $this->argumentDefinitions.

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91401: Fluid AbstractViewHelper::getArguments incompatibilitiesClosed2020-05-14

Actions
Actions

Also available in: Atom PDF