eZ\Publish\Core\FieldType\Page\PageService::getValidBlockItems PHP Метод

getValidBlockItems() публичный Метод

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
Результат eZ\Publish\Core\FieldType\Page\Parts\Item[]
    public function getValidBlockItems(Block $block)
    {
        if (isset($this->validBlockItems[$block])) {
            return $this->validBlockItems[$block];
        }
        return $this->validBlockItems[$block] = $this->getStorageGateway()->getValidBlockItems($block);
    }

Usage Example

 public function injectValidItems(FilterViewParametersEvent $event)
 {
     $view = $event->getView();
     if ($view instanceof BlockView) {
         $event->getParameterBag()->set('valid_items', $this->pageService->getValidBlockItems($view->getBlock()));
     }
 }
All Usage Examples Of eZ\Publish\Core\FieldType\Page\PageService::getValidBlockItems