Bug #9090
Chaining of ->assign() does not work anymore
Status: | Resolved | Start date: | 2010-07-30 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | View | |||
Target version: | - | |||
Has patch: | Affected Flow version: |
Description
Since the latest release of Fluid the chaining of the ->assign() method does not work anymore
$this->view ->assign('request', $request) ->assign('languages', $this->languageRepository->findActive());
Throws error Fatal error: Call to a member function assign() on a non-object
Related issues
Associated revisions
[+BUGFIX] Fluid (View): AbstractTemplateView now correctly implements F3\FLOW3\MVC\View\ViewInterface and assign() and assignMultiple() will return an instance of $this to allow chaining again like $this->view->assign()->assign()... This fixes #9090
History
#1 Updated by Bastian Waidelich about 5 years ago
- Category changed from Core to View
The feature of chaining variable assignments was added with r2899
Since r4659 This feature was (unintentionally?) removed
Note: I think the assign functions should be moved back to FLOW3/Extbase AbstractView.
Or at least they should be defined in the global ViewInterface.
Note2: For v4 we should consider re-adding this for the Hotfix releases (1.1.x)
#2 Updated by Bastian Waidelich about 5 years ago
- File 9090_FLOW3_v1.patch added
- File 9090_Fluid_v1.patch added
- File 9090_tx_extbase_v1.patch added
- File 9090_tx_fluid_v1.patch added
- Assigned To changed from Bastian Waidelich to Sebastian Kurfuerst
Attached patches fixes the issue by adapting the interface and concrete view implementations. Additionally they add some unit tests and cleanups.
@Sebastian: Could you please check & apply (a subset of) the attached extbase & fluid patches for the Hotfix release? Afterwards feel free to re-assign this to me, so I can commit the rest to trunk.
#3 Updated by Bastian Waidelich almost 6 years ago
- Assigned To changed from Sebastian Kurfuerst to Bastian Waidelich
I'll take care of this (for trunks of FLOW3, Fluid, tx_extbase & tx_fluid)
#4 Updated by Bastian Waidelich almost 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset r4931.