Bug #3994
Viewhelpers are instanciated multiple times in ViewHelperNode
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
Associated revisions
[+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.