PHP Интерфейс Sulu\Bundle\PreviewBundle\Preview\PreviewInterface

Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
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.

Описание методов

exists() публичный Метод

Returns true if such a session exists.
public exists ( string $token ) : boolean
$token string To identify the preview-session
Результат boolean

render() публичный Метод

Returns rendered preview-session.
public render ( string $token, string $webspaceKey, string $locale ) : string
$token string To identify the preview-session
$webspaceKey string Webspace to render object
$locale string
Результат string Complete html response

start() публичный Метод

Starts a new preview session.
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
Результат string Token can be used to reuse this preview-session

stop() публичный Метод

Stops the preview-session and deletes the data.
public stop ( string $token )
$token string To identify the preview-session

update() публичный Метод

Updates given data in the 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
Результат array Changes for the rendering

updateContext() публичный Метод

Updates given context and restart preview with given data.
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
Результат string Complete html response