public function getValidBlockItemsAsContentInfo(Block $block)
    {
        $contentInfoObjects = array();
        foreach ($this->getValidBlockItems($block) as $item) {
            try {
                $contentInfoObjects[] = $this->contentService->loadContentInfo($item->contentId);
            } catch (UnauthorizedException $e) {
                // If unauthorized, disregard block as "valid" and continue loading other blocks.
            }
        }

        return $contentInfoObjects;
    }
public function getValidBlockItemsAsContentInfo(Block $block)
    {
        $contentInfoObjects = array();
        foreach ($this->getValidBlockItems($block) as $item) {
            try {
                $contentInfoObjects[] = $this->contentService->loadContentInfo($item->contentId);
            } catch (UnauthorizedException $e) {
                // If unauthorized, disregard block as "valid" and continue loading other blocks.
            }
        }

        return $contentInfoObjects;
    }
public function getValidBlockItemsAsContentInfo ( Block $ block ) { $ contentInfoObjects = array ( ) ; foreach ( $ this -> getValidBlockItems ( $ block ) as $ item ) { try { $ contentInfoObjects [ ] = $ this -> contentService -> loadContentInfo ( $ item -> contentId ) ; } catch ( UnauthorizedException $ e ) { // If unauthorized, disregard block as "valid" and continue loading other blocks. } } return $ contentInfoObjects ; }
Returns valid block items as content objects.

@param \eZ\Publish\Core\FieldType\Page\Parts\Block $block

@return \eZ\Publish\API\Repository\Values\Content\ContentInfo[]
Returns valid block items as content objects .