diff --git a/typo3/sysext/extbase/Classes/Mvc/View/JsonView.php b/typo3/sysext/extbase/Classes/Mvc/View/JsonView.php index 281501fd081cd174b2b615a3ac6ea853c2639b78..49ae5a3472653ff95c648025657fa9b3cdfe8e19 100644 --- a/typo3/sysext/extbase/Classes/Mvc/View/JsonView.php +++ b/typo3/sysext/extbase/Classes/Mvc/View/JsonView.php @@ -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):