Commit 593fb820 authored by Daniel Siepmann's avatar Daniel Siepmann Committed by Georg Ringer
Browse files

[TASK] Fix class namespace in php doc comment of JsonView

This would allow everyone else to copy and paste example.

Releases: master, 9.5
Resolves: #89019
Change-Id: I64bc9d9f2db6d92bf264cff9d2172e6cc1ff36ee
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61559


Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
parent c4eb6a56
......@@ -68,27 +68,27 @@ class JsonView extends AbstractView
*
* Example 1:
*
* array(
* 'variable1' => array(
* '_only' => array('property1', 'property2', ...)
* ),
* 'variable2' => array(
* '_exclude' => array('property3', 'property4, ...)
* ),
* 'variable3' => array(
* '_exclude' => array('secretTitle'),
* '_descend' => array(
* 'customer' => array(
* '_only' => array('firstName', 'lastName')
* )
* )
* ),
* 'somearrayvalue' => array(
* '_descendAll' => array(
* '_only' => array('property1')
* )
* )
* )
* [
* 'variable1' => [
* '_only' => ['property1', 'property2', ...]
* ],
* 'variable2' => [
* '_exclude' => ['property3', 'property4, ...]
* ],
* 'variable3' => [
* '_exclude' => ['secretTitle'],
* '_descend' => [
* 'customer' => [
* '_only' => [array(]'firstName', 'lastName']
* ]
* ]
* ],
* 'somearrayvalue' => [
* '_descendAll' => [
* '_only' => ['property1']
* ]
* ]
* ]
*
* Of variable1 only property1 and property2 will be included.
* Of variable2 all properties except property3 and property4
......@@ -111,18 +111,18 @@ class JsonView extends AbstractView
*
* Example 2: exposing object identifier
*
* array(
* 'variableFoo' => array(
* '_exclude' => array('secretTitle'),
* '_descend' => array(
* 'customer' => array( // consider 'customer' being a persisted entity
* '_only' => array('firstName'),
* '_exposeObjectIdentifier' => TRUE,
* '_exposedObjectIdentifierKey' => 'guid'
* )
* )
* )
* )
* [
* 'variableFoo' => [
* '_exclude' => ['secretTitle'],
* '_descend' => [
* 'customer' => [ // consider 'customer' being a persisted entity
* '_only' => ['firstName'],
* '_exposeObjectIdentifier' => TRUE,
* '_exposedObjectIdentifierKey' => 'guid'
* ]
* ]
* ]
* ]
*
* Note for entity objects you are able to expose the object's identifier
* also, just add an "_exposeObjectIdentifier" directive set to TRUE and
......@@ -135,17 +135,17 @@ class JsonView extends AbstractView
*
* Example 3: exposing object's class name
*
* array(
* 'variableFoo' => array(
* '_exclude' => array('secretTitle'),
* '_descend' => array(
* 'customer' => array( // consider 'customer' being an object
* '_only' => array('firstName'),
* '_exposeClassName' => TYPO3\Flow\Mvc\View\JsonView::EXPOSE_CLASSNAME_FULLY_QUALIFIED
* )
* )
* )
* )
* [
* 'variableFoo' => [
* '_exclude' => ['secretTitle'],
* '_descend' => [
* 'customer' => [ // consider 'customer' being an object
* '_only' => ['firstName'],
* '_exposeClassName' => \TYPO3\CMS\Extbase\Mvc\View\JsonView::EXPOSE_CLASSNAME_FULLY_QUALIFIED
* ]
* ]
* ]
* ]
*
* The ``_exposeClassName`` is similar to the objectIdentifier one, but the class name is added to the
* JSON object output, for example (summarized):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment