Class

eZ\Publish\Core\Helper\ContentPreviewHelper

class ContentPreviewHelper implements SiteAccessAware

Methods

__construct(EventDispatcherInterface $eventDispatcher, SiteAccessRouterInterface $siteAccessRouter)

setSiteAccess(SiteAccess $siteAccess = null)

SiteAccess getOriginalSiteAccess()

Return original SiteAccess.

SiteAccess changeConfigScope(string $siteAccessName)

Switches configuration scope to $siteAccessName and returns the new SiteAccess to use for preview.

SiteAccess restoreConfigScope()

Restores original config scope.

bool isPreviewActive()

setPreviewActive(bool $previewActive)

Content getPreviewedContent()

setPreviewedContent(Content $previewedContent)

Location getPreviewedLocation()

setPreviewedLocation(Location $previewedLocation)

Details

at line 52
public __construct(EventDispatcherInterface $eventDispatcher, SiteAccessRouterInterface $siteAccessRouter)

Parameters

EventDispatcherInterface $eventDispatcher
SiteAccessRouterInterface $siteAccessRouter

at line 58
public setSiteAccess(SiteAccess $siteAccess = null)

Parameters

SiteAccess $siteAccess

at line 68
public SiteAccess getOriginalSiteAccess()

Return original SiteAccess.

Return Value

SiteAccess

at line 80
public SiteAccess changeConfigScope(string $siteAccessName)

Switches configuration scope to $siteAccessName and returns the new SiteAccess to use for preview.

Parameters

string $siteAccessName

Return Value

SiteAccess

at line 93
public SiteAccess restoreConfigScope()

Restores original config scope.

Return Value

SiteAccess

at line 104
public bool isPreviewActive()

Return Value

bool

at line 112
public setPreviewActive(bool $previewActive)

Parameters

bool $previewActive

at line 120
public Content getPreviewedContent()

Return Value

Content

at line 128
public setPreviewedContent(Content $previewedContent)

Parameters

Content $previewedContent

at line 136
public Location getPreviewedLocation()

Return Value

Location

at line 144
public setPreviewedLocation(Location $previewedLocation)

Parameters

Location $previewedLocation