Class

eZ\Bundle\EzPublishCoreBundle\FieldType\Page\PageService

class PageService extends PageService

Methods

__construct(ContentService $contentService, array $zoneDefinition = array(), array $blockDefinition = array())

Constructor.

from PageService
array getZoneDefinition()

Returns zone definition as an array.

from PageService
array getZoneDefinitionByLayout(string $layoutIdentifier)

Returns a zone definition for a given layout.

from PageService
string getLayoutTemplate(string $layoutIdentifier)

Returns the template to use for given layout.

from PageService
bool hasZoneLayout(string $layoutIdentifier)

Checks if zone definition contains a layout having $layoutIdentifier as identifier.

from PageService
array getAvailableZoneLayouts()

Returns list of available zone layouts.

from PageService
array getBlockDefinition()

Returns block definition as an array.

from PageService
array getBlockDefinitionByIdentifier(string $blockIdentifier)

Returns a block definition for a given block identifier.

from PageService
bool hasBlockDefinition(string $blockIdentifier)

Checks if block definition contains a block having $blockIdentifier as identifier.

from PageService
setStorageGateway(Gateway $storageGateway)

Injects the storage gateway to interact with.

from PageService
bool hasStorageGateway()

Checks if storage gateway has already been injected or not.

from PageService
Item[] getValidBlockItems(Block $block)

Returns valid items (that are to be displayed), for a given block.

from PageService
Item|null getLastValidBlockItem(Block $block)

Returns the last valid item, for a given block.

from PageService
Item[] getWaitingBlockItems(Block $block)

Returns queued items (the next to be displayed), for a given block.

from PageService
Item[] getArchivedBlockItems(Block $block)

Returns archived items (that were previously displayed), for a given block.

from PageService
Block loadBlock(int|string $id)

Loads Block object for the given $id.

from PageService
ContentInfo[] getValidBlockItemsAsContentInfo(Block $block)

Returns valid block items as content objects.

Details

in PageService at line 88
public __construct(ContentService $contentService, array $zoneDefinition = array(), array $blockDefinition = array())

Constructor.

Parameters

ContentService $contentService
array $zoneDefinition
array $blockDefinition

in PageService at line 108
public array getZoneDefinition()

Returns zone definition as an array.

Return Value

array

in PageService at line 123
public array getZoneDefinitionByLayout(string $layoutIdentifier)

Returns a zone definition for a given layout.

It consists of a configuration array for the given layout.

Parameters

string $layoutIdentifier

Return Value

array

Exceptions

OutOfBoundsException If $layoutIdentifier is invalid

in PageService at line 139
public string getLayoutTemplate(string $layoutIdentifier)

Returns the template to use for given layout.

Parameters

string $layoutIdentifier

Return Value

string

in PageService at line 153
public bool hasZoneLayout(string $layoutIdentifier)

Checks if zone definition contains a layout having $layoutIdentifier as identifier.

Parameters

string $layoutIdentifier

Return Value

bool

in PageService at line 163
public array getAvailableZoneLayouts()

Returns list of available zone layouts.

Return Value

array

in PageService at line 173
public array getBlockDefinition()

Returns block definition as an array.

Return Value

array

in PageService at line 187
public array getBlockDefinitionByIdentifier(string $blockIdentifier)

Returns a block definition for a given block identifier.

Parameters

string $blockIdentifier

Return Value

array

Exceptions

OutOfBoundsException If $blockIdentifier is invalid.

in PageService at line 203
public bool hasBlockDefinition(string $blockIdentifier)

Checks if block definition contains a block having $blockIdentifier as identifier.

Parameters

string $blockIdentifier

Return Value

bool

in PageService at line 213
public setStorageGateway(Gateway $storageGateway)

Injects the storage gateway to interact with.

Parameters

Gateway $storageGateway

in PageService at line 223
public bool hasStorageGateway()

Checks if storage gateway has already been injected or not.

Return Value

bool

in PageService at line 249
public Item[] getValidBlockItems(Block $block)

Returns valid items (that are to be displayed), for a given block.

Parameters

Block $block

Return Value

Item[]

in PageService at line 265
public Item|null getLastValidBlockItem(Block $block)

Returns the last valid item, for a given block.

Parameters

Block $block

Return Value

Item|null

in PageService at line 281
public Item[] getWaitingBlockItems(Block $block)

Returns queued items (the next to be displayed), for a given block.

Parameters

Block $block

Return Value

Item[]

in PageService at line 297
public Item[] getArchivedBlockItems(Block $block)

Returns archived items (that were previously displayed), for a given block.

Parameters

Block $block

Return Value

Item[]

in PageService at line 315
public Block loadBlock(int|string $id)

Loads Block object for the given $id.

Parameters

int|string $id

Return Value

Block

Exceptions

NotFoundException If block could not be found.

at line 24
public ContentInfo[] getValidBlockItemsAsContentInfo(Block $block)

Returns valid block items as content objects.

Parameters

Block $block

Return Value

ContentInfo[]