Method | Description | |
---|---|---|
exists ( string $token ) : boolean | Returns true if such a session exists. | |
render ( string $token, string $webspaceKey, string $locale ) : string | Returns rendered preview-session. | |
start ( string $objectClass, string $id, integer $userId, string $webspaceKey, string $locale, array $data = [] ) : string | Starts a new preview session. | |
stop ( string $token ) | Stops the preview-session and deletes the data. | |
update ( string $token, string $webspaceKey, string $locale, array $data ) : array | Updates given data in the preview-session. | |
updateContext ( string $token, string $webspaceKey, string $locale, array $context, array $data ) : string | Updates given context and restart preview with given data. |
public start ( string $objectClass, string $id, integer $userId, string $webspaceKey, string $locale, array $data = [] ) : string | ||
$objectClass | string | Class of object |
$id | string | Identifier of object |
$userId | integer | |
$webspaceKey | string | |
$locale | string | |
$data | array | Initial data will be set on the object |
return | string | Token can be used to reuse this preview-session |
public update ( string $token, string $webspaceKey, string $locale, array $data ) : array | ||
$token | string | To identify the preview-session |
$webspaceKey | string | Webspace to render object |
$locale | string | |
$data | array | Data which will be updated before re-rendering content |
return | array | Changes for the rendering |
public updateContext ( string $token, string $webspaceKey, string $locale, array $context, array $data ) : string | ||
$token | string | To identify the preview-session |
$webspaceKey | string | Webspace to render object |
$locale | string | |
$context | array | Contains contextual data to restart preview |
$data | array | Data which will be updated before re-rendering content |
return | string | Complete html response |