PageJsonProcessor
class PageJsonProcessor
Helper for reading and interpreting the Frontend Page JSON Format We have two syntaxes for attachment:
- Syntax A: A fixed defined structure of components having a fixed documentId reference
- Syntax B: A new, more flexible way by allowing the frontend to define elements with a @type=attachment key
Constants
| JSONPATH_ALL_COMPONENTS |
|
| TYPES_WITH_ATTACHMENTS |
|
| JSONPATH_ATTACHMENT_TYPE |
|
| JSONPATH_CONTENTREFERENCE_TYPE |
|
| TYPES_WITH_SIGNED_CONFIG |
|
| INDEX_PROPERTIES |
|
Methods
No description
Returns an array of all used attachment uuids
Return array of all used content reference uuids (e.g. trendvote)
Returns an array of all indexable content of the page
Return Page JSON incl. all modifications
Runs a custom query against the JSON
Allows to modify the component configuration by providing a callback which is called for each component and includes the JsonObject representation which can be modified
Adds a cryptographic signature to all component configurations which require it for a secure backend options transport
Replaces the attachments based on the passed replaceArray which assigns a new document info for existing documentIds
Replaces the references based on the passed replaceArray which assigns a new reference info for existing references
Details
at line 41
__construct(string $pageJson = null)
No description
at line 73
array
getAttachmentUuids()
Returns an array of all used attachment uuids
at line 81
array
getContentReferenceUuids()
Return array of all used content reference uuids (e.g. trendvote)
at line 160
array
getIndexableContent()
Returns an array of all indexable content of the page
at line 65
string
getJson()
Return Page JSON incl. all modifications
at line 200
array
getJsonElements($jsonPath)
Runs a custom query against the JSON
at line 183
void
modifyComponents($callback, $limitToTypes = [])
Allows to modify the component configuration by providing a callback which is called for each component and includes the JsonObject representation which can be modified
at line 56
PageJsonProcessor
setJsonObject(stdClass $pageJson)
No description
at line 147
void
signConfiguration()
Adds a cryptographic signature to all component configurations which require it for a secure backend options transport
at line 111
void
updateAttachments(array $replaceArray)
Replaces the attachments based on the passed replaceArray which assigns a new document info for existing documentIds
at line 131
void
updateContentReferencess(array $replaceArray)
Replaces the references based on the passed replaceArray which assigns a new reference info for existing references