PHP Class Sulu\Bundle\PreviewBundle\Preview\Preview

Inheritance: implements Sulu\Bundle\PreviewBundle\Preview\PreviewInterface
Show file Open project: sulu/sulu

Public Methods

Method Description
__construct ( array $objectProviders, Doctrine\Common\Cache\Cache $dataCache, Sulu\Bundle\PreviewBundle\Preview\Renderer\PreviewRendererInterface $renderer, integer $cacheLifeTime = 3600 )
exists ( $token )
render ( $token, $webspaceKey, $locale )
start ( $objectClass, $id, $userId, $webspaceKey, $locale, array $data = [] )
stop ( $token )
update ( $token, $webspaceKey, $locale, array $data )
updateContext ( $token, $webspaceKey, $locale, array $context, array $data )

Protected Methods

Method Description
fetch ( string $token ) : mixed Fetch the object.
getProvider ( string $objectClass ) : mixed | Sulu\Bundle\PreviewBundle\Preview\Object\PreviewObjectProviderInterface Returns provider for given object-class.
save ( string $token, string $object ) Save the object.

Method Details

__construct() public method

public __construct ( array $objectProviders, Doctrine\Common\Cache\Cache $dataCache, Sulu\Bundle\PreviewBundle\Preview\Renderer\PreviewRendererInterface $renderer, integer $cacheLifeTime = 3600 )
$objectProviders array
$dataCache Doctrine\Common\Cache\Cache
$renderer Sulu\Bundle\PreviewBundle\Preview\Renderer\PreviewRendererInterface
$cacheLifeTime integer

exists() public method

public exists ( $token )

fetch() protected method

Fetch the object.
protected fetch ( string $token ) : mixed
$token string
return mixed

getProvider() protected method

Returns provider for given object-class.
protected getProvider ( string $objectClass ) : mixed | Sulu\Bundle\PreviewBundle\Preview\Object\PreviewObjectProviderInterface
$objectClass string
return mixed | Sulu\Bundle\PreviewBundle\Preview\Object\PreviewObjectProviderInterface

render() public method

public render ( $token, $webspaceKey, $locale )

save() protected method

Save the object.
protected save ( string $token, string $object )
$token string
$object string

start() public method

public start ( $objectClass, $id, $userId, $webspaceKey, $locale, array $data = [] )
$data array

stop() public method

public stop ( $token )

update() public method

public update ( $token, $webspaceKey, $locale, array $data )
$data array

updateContext() public method

public updateContext ( $token, $webspaceKey, $locale, array $context, array $data )
$context array
$data array