Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • T TYPO3.CMS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • accessibilityaccessibility
  • TYPO3.CMS
  • Repository
Switch branch/tag
  • TYPO3.CMS
  • typo3
  • sysext
  • form
  • Classes
  • Controller
  • FormManagerController.php
Find file BlameHistoryPermalink
  • Oliver Bartsch's avatar
    [TASK] Add convenience method for extbase JSON responses · 0943a9c5
    Oliver Bartsch authored Jun 30, 2021
    Since #92784 extbase actions require to return a PSR-7 Response.
    To ease the migration path, the convenience method htmlResponse()
    was added. This method creates a new PSR-7 Response with the correct
    header and status code. Furthermore, in case no $html content is
    given explicitly, the current view is rendered and the result
    passed as response body.
    
    Extbase however also features the JsonView, which is widely
    used in third-party extensions as well as in multiple core
    controllers itself. Also TSFE has to be respected when adding
    the content-type header with the correct charset. Therefore,
    a new method jsonResponse(), with similar functionality to
    htmlResponse(), is now added along with adaptations of all
    places in core controllers.
    
    Resolves: #94440
    Related: #92784
    Releases: master
    Change-Id: Ic591a8788f586050578db8b4187e29325d180f49
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69664
    
    
    Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
    Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
    Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
    Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
    Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
    0943a9c5