Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Bundle/EzPublishCoreBundle/FieldType/Page/PageService.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Bundle\EzPublishCoreBundle\FieldType\Page;
8
9 use eZ\Publish\Core\FieldType\Page\PageService as BasePageService;
10 use eZ\Publish\Core\FieldType\Page\Parts\Block;
11 use eZ\Publish\Core\Base\Exceptions\UnauthorizedException;
12
13 class PageService extends BasePageService
14 {
22 public function getValidBlockItemsAsContentInfo(Block $block)
23 {
24 $contentInfoObjects = [];
25 foreach ($this->getValidBlockItems($block) as $item) {
26 try {
27 $contentInfoObjects[] = $this->contentService->loadContentInfo($item->contentId);
28 } catch (UnauthorizedException $e) {
29 // If unauthorized, disregard block as "valid" and continue loading other blocks.
30 }
31 }
32
33 return $contentInfoObjects;
34 }
35 }
eZ\Bundle\EzPublishCoreBundle\FieldType\Page\PageService
Definition: Bundle/EzPublishCoreBundle/FieldType/Page/PageService.php:14
eZ\Bundle\EzPublishCoreBundle\FieldType\Page\PageService\getValidBlockItemsAsContentInfo
getValidBlockItemsAsContentInfo(Block $block)
Returns valid block items as content objects.
Definition: Bundle/EzPublishCoreBundle/FieldType/Page/PageService.php:22
eZ\Publish\Core\Base\Exceptions\UnauthorizedException
UnauthorizedException Exception implementation.
Definition: Core/Base/Exceptions/UnauthorizedException.php:21
eZ\Publish\Core\FieldType\Page\PageService
Definition: Publish/Core/FieldType/Page/PageService.php:18
eZ\Publish\Core\FieldType\Page\PageService\getValidBlockItems
getValidBlockItems(Block $block)
Returns valid items (that are to be displayed), for a given block.
Definition: Publish/Core/FieldType/Page/PageService.php:243
eZ\Publish\Core\FieldType\Page\Parts\Block
Definition: FieldType/Page/Parts/Block.php:22
eZ\Bundle\EzPublishCoreBundle\FieldType\Page
Definition: Bundle/EzPublishCoreBundle/FieldType/Page/PageService.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.