Feature #7113

Make view resolution in ActionController independent from Fluid

Added by Christopher Hlubek over 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
MVC
Start date:
2010-04-02
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

Currently the view for any ActionController is tied to Fluid. For every action processed, a Fluid TemplateView will be created. Only if a template cannot be found the format is taken into account for the view object name.

This will work out as long as there is no Fluid template for an action that should be rendered with another view. Considering the case that we need format specific views (JSON, PDF, CSV, ...) for the same action that also renders HTML we need to change the current mechanism.

I would propose a priority based resolver like used for the request handlers. So a view would then be resolved by a view resolver that checks if a view implementation can handle the current request (most commonly by checking the format).

Also available in: Atom PDF