Feature #2852

Improve viewObjectName determination

Added by Bastian Waidelich over 12 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
MVC
Start date:
2009-03-16
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

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.

#1

Updated by Bastian Waidelich over 12 years ago

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

Applied in changeset r1997.

Also available in: Atom PDF