Bug #3994

Viewhelpers are instanciated multiple times in ViewHelperNode

Added by Bastian Waidelich about 6 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2009-07-27
Priority:Must have Due date:
Assigned To:Sebastian Kurfuerst % Done:

100%

Category:Core
Target version:-
Has patch: Affected Flow version:

Description

In the evaluate() method of \F3\Fluid\Core\Parser\SyntaxTree\ViewHelperNode there is

$viewHelper = $objectFactory->create($this->viewHelperClassName);

The viewhelper should be stored in a private/protected field to be able to do

if ($this->viewHelper === NULL) {
    $this->viewHelper = $objectFactory->create($this->viewHelperClassName);
}

This will increase performance and make it possible to store private values in view helpers.


Related issues

related to TYPO3.Fluid - Bug #4051: TagBuilder is not resetted when a view helper is initiali... Resolved 2009-07-29

Associated revisions

Revision 758a2e10
Added by Sebastian Kurfuerst about 6 years ago

[+BUGFIX] Fluid (Core): ViewHelpers are not anymore instanciated multiple times for one tag in the template. Now, you can store values inside a ViewHelper, f.e. to see how often it has been rendered. Fixes #3994.

History

#1 Updated by Sebastian Kurfuerst about 6 years ago

  • Status changed from New to Accepted
  • Priority changed from Should have to Must have

#2 Updated by Sebastian Kurfuerst about 6 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r2895.

Also available in: Atom PDF