MVC and request handling · Question 3 of 12

Which statement does a typical Extbase action end with so that its Fluid template is rendered and output?

1 answer is correct. Easy

Show answer

Answer

  • B return $this->htmlResponse();

Explanation

Every Extbase action must return a PSR-7 ResponseInterface. $this->htmlResponse() without an argument renders the Fluid template belonging to the action and wraps the result in a text/html response; with a string argument, that string is used as the body instead of the template. return $this->view->render(); is tempting but only returns a string – if an action returns anything other than a response, Extbase throws a RuntimeException. jsonResponse() is intended for JSON output, for example together with JsonView.

Certifications & exams

Which exam comes next?

You can already practise for 19 exams, and 21 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications