PHP Class eZ\Publish\Core\FieldType\Page\PageService

Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Свойство Type Description
$archivedBlockItems SplObjectStorage Cached archived block items by block.
$blockDefinition array Block definition set in YAML config.
$blocksById eZ\Publish\Core\FieldType\Page\Parts\Block[] Cached Blocks by id.
$contentService eZ\Publish\API\Repository\ContentService
$lastValidItems SplObjectStorage Cached last valid items, by block (one per block).
$storageGateway eZ\Publish\Core\FieldType\Page\PageStorage\Gateway
$validBlockItems SplObjectStorage Cached valid block items by block.
$waitingBlockItems SplObjectStorage Cached waiting block items by block.
$zoneDefinition array Zone definition set in YAML config.

Méthodes publiques

Méthode Description
__construct ( eZ\Publish\API\Repository\ContentService $contentService, array $zoneDefinition = [], array $blockDefinition = [] ) Constructor.
getArchivedBlockItems ( Block $block ) : Item[] Returns archived items (that were previously displayed), for a given block.
getAvailableZoneLayouts ( ) : array Returns list of available zone layouts.
getBlockDefinition ( ) : array Returns block definition as an array.
getBlockDefinitionByIdentifier ( string $blockIdentifier ) : array Returns a block definition for a given block identifier.
getLastValidBlockItem ( Block $block ) : Item | null Returns the last valid item, for a given block.
getLayoutTemplate ( string $layoutIdentifier ) : string Returns the template to use for given layout.
getValidBlockItems ( Block $block ) : Item[] Returns valid items (that are to be displayed), for a given block.
getWaitingBlockItems ( Block $block ) : Item[] Returns queued items (the next to be displayed), for a given block.
getZoneDefinition ( ) : array Returns zone definition as an array.
getZoneDefinitionByLayout ( string $layoutIdentifier ) : array Returns a zone definition for a given layout.
hasBlockDefinition ( string $blockIdentifier ) : boolean Checks if block definition contains a block having $blockIdentifier as identifier.
hasStorageGateway ( ) : boolean Checks if storage gateway has already been injected or not.
hasZoneLayout ( string $layoutIdentifier ) : boolean Checks if zone definition contains a layout having $layoutIdentifier as identifier.
loadBlock ( integer | string $id ) : Block Loads Block object for the given $id.
setStorageGateway ( Gateway $storageGateway ) Injects the storage gateway to interact with.

Méthodes protégées

Méthode Description
getStorageGateway ( ) : Gateway

Method Details

__construct() public méthode

Constructor.
public __construct ( eZ\Publish\API\Repository\ContentService $contentService, array $zoneDefinition = [], array $blockDefinition = [] )
$contentService eZ\Publish\API\Repository\ContentService
$zoneDefinition array
$blockDefinition array

getArchivedBlockItems() public méthode

Returns archived items (that were previously displayed), for a given block.
public getArchivedBlockItems ( Block $block ) : Item[]
$block eZ\Publish\Core\FieldType\Page\Parts\Block
Résultat eZ\Publish\Core\FieldType\Page\Parts\Item[]

getAvailableZoneLayouts() public méthode

Returns list of available zone layouts.
public getAvailableZoneLayouts ( ) : array
Résultat array

getBlockDefinition() public méthode

Returns block definition as an array.
public getBlockDefinition ( ) : array
Résultat array

getBlockDefinitionByIdentifier() public méthode

Returns a block definition for a given block identifier.
public getBlockDefinitionByIdentifier ( string $blockIdentifier ) : array
$blockIdentifier string
Résultat array

getLastValidBlockItem() public méthode

Returns the last valid item, for a given block.
public getLastValidBlockItem ( Block $block ) : Item | null
$block eZ\Publish\Core\FieldType\Page\Parts\Block
Résultat eZ\Publish\Core\FieldType\Page\Parts\Item | null

getLayoutTemplate() public méthode

Returns the template to use for given layout.
public getLayoutTemplate ( string $layoutIdentifier ) : string
$layoutIdentifier string
Résultat string

getStorageGateway() protected méthode

protected getStorageGateway ( ) : Gateway
Résultat eZ\Publish\Core\FieldType\Page\PageStorage\Gateway

getValidBlockItems() public méthode

Returns valid items (that are to be displayed), for a given block.
public getValidBlockItems ( Block $block ) : Item[]
$block eZ\Publish\Core\FieldType\Page\Parts\Block
Résultat eZ\Publish\Core\FieldType\Page\Parts\Item[]

getWaitingBlockItems() public méthode

Returns queued items (the next to be displayed), for a given block.
public getWaitingBlockItems ( Block $block ) : Item[]
$block eZ\Publish\Core\FieldType\Page\Parts\Block
Résultat eZ\Publish\Core\FieldType\Page\Parts\Item[]

getZoneDefinition() public méthode

Returns zone definition as an array.
public getZoneDefinition ( ) : array
Résultat array

getZoneDefinitionByLayout() public méthode

It consists of a configuration array for the given layout.
public getZoneDefinitionByLayout ( string $layoutIdentifier ) : array
$layoutIdentifier string
Résultat array

hasBlockDefinition() public méthode

Checks if block definition contains a block having $blockIdentifier as identifier.
public hasBlockDefinition ( string $blockIdentifier ) : boolean
$blockIdentifier string
Résultat boolean

hasStorageGateway() public méthode

Checks if storage gateway has already been injected or not.
public hasStorageGateway ( ) : boolean
Résultat boolean

hasZoneLayout() public méthode

Checks if zone definition contains a layout having $layoutIdentifier as identifier.
public hasZoneLayout ( string $layoutIdentifier ) : boolean
$layoutIdentifier string
Résultat boolean

loadBlock() public méthode

Loads Block object for the given $id.
public loadBlock ( integer | string $id ) : Block
$id integer | string
Résultat eZ\Publish\Core\FieldType\Page\Parts\Block

setStorageGateway() public méthode

Injects the storage gateway to interact with.
public setStorageGateway ( Gateway $storageGateway )
$storageGateway eZ\Publish\Core\FieldType\Page\PageStorage\Gateway

Property Details

$archivedBlockItems protected_oe property

Cached archived block items by block.
protected SplObjectStorage $archivedBlockItems
Résultat SplObjectStorage

$blockDefinition protected_oe property

Block definition set in YAML config.
protected array $blockDefinition
Résultat array

$blocksById protected_oe property

Cached Blocks by id.
protected Block[],eZ\Publish\Core\FieldType\Page\Parts $blocksById
Résultat eZ\Publish\Core\FieldType\Page\Parts\Block[]

$contentService protected_oe property

protected ContentService,eZ\Publish\API\Repository $contentService
Résultat eZ\Publish\API\Repository\ContentService

$lastValidItems protected_oe property

Cached last valid items, by block (one per block).
protected SplObjectStorage $lastValidItems
Résultat SplObjectStorage

$storageGateway protected_oe property

protected Gateway,eZ\Publish\Core\FieldType\Page\PageStorage $storageGateway
Résultat eZ\Publish\Core\FieldType\Page\PageStorage\Gateway

$validBlockItems protected_oe property

Cached valid block items by block.
protected SplObjectStorage $validBlockItems
Résultat SplObjectStorage

$waitingBlockItems protected_oe property

Cached waiting block items by block.
protected SplObjectStorage $waitingBlockItems
Résultat SplObjectStorage

$zoneDefinition protected_oe property

Zone definition set in YAML config.
protected array $zoneDefinition
Résultat array