Feature #2852
Improve viewObjectName determination
Status: | Resolved | Start date: | 2009-03-16 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | MVC | |||
Target version: | TYPO3 Flow Base Distribution - 1.0 alpha 1 | |||
PHP Version: | Complexity: | |||
Has patch: |
Description
Currently \F3\FLOW3\MVC\Controller\ActionController either calls resolveViewObjectName() or uses $this->viewObjectName to determine the view object name.
That means that you'll have to create a view for every action in your controller, or you set $viewObjectName to a general view class. But you can't have both, e.g. use F3\Fluid\View\TemplateView for all actions and your own views for ajax-requests (e.g. @format = 'json').
A possible solution could be:
rename $this->viewObjectName to $this->defaultViewObjectName in ActionController and always check, whether there exists a custom implementation first.
Associated revisions
- FLOW3: (MVC) Renamed $viewObjectName to $defaultViewObjectName in ActionController. If no custom view class can be found that matches $viewObjectNamePattern, $defaultViewObjectName is used. Please adjust your controllers accordingly, this is a breaking change! Resolves #2852
History
#1 Updated by Bastian Waidelich over 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset r1997.