Project

General

Profile

Actions

Feature #101124

open

Make Templates optional in Extbase

Added by Aristeidis Karavas 11 months ago. Updated 11 months ago.

Status:
Needs Feedback
Priority:
Should have
Category:
Extbase
Start date:
2023-06-20
Due date:
% Done:

0%

Estimated time:
PHP Version:
8.2
Tags:
extbase, JsonResponse, HtmlResponse, view, template
Complexity:
Sprint Focus:

Description

Since ResponseInterface has been introduced, one can define a return type, JsonResponse , HtmlResponse etc.

The problem here is that using for example JsonResponse with Extbase and not defining a template for it, TYPO3 throws an exception. Now, we have to add a template and format it to a json structure which could be PITA, specially when the JSON is huge. One could use Middlewares , but with TYPO3 12, one can not use Extbase features if not in Extbase context. So now we are in a dead end.

Solution
Make the template requirement optional, or add a method which deactivates it for the action, like

$this->view->withTemplate(false);

Files


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Feature #101125: Ability to convert Domain Models to ArrayNew2023-06-20

Actions
Actions

Also available in: Atom PDF