Feature: #90347 - Enable recursive transformation of properties in JsonView¶
\TYPO3\CMS\Extbase\Mvc\View\JsonView is now able to resolve
recursive properties of objects, e.g. directories containing directories or
comments containing comments as replies.
This is for 1:1 relations, where a comment has at most 1 comment.
$configuration = [ 'comment' => [ '_recursive' => ['comment'] ] ];
This is for the more common 1:n relation in which you have lists of sub objects.
$configuration = [ 'directories' => [ '_descendAll' => [ '_recursive' => ['directories'] ], ] ];
You can put all the other configuration like
_exclude at the same
_recursive and the view will apply this for all levels.
Developers can now use the
_recursive property in the
configuration in order to resolve recursive properties instead of defining each