public function getValidBlockItems(Block $block) { if (isset($this->validBlockItems[$block])) { return $this->validBlockItems[$block]; } return $this->validBlockItems[$block] = $this->getStorageGateway()->getValidBlockItems($block); }
public function injectValidItems(FilterViewParametersEvent $event) { $view = $event->getView(); if ($view instanceof BlockView) { $event->getParameterBag()->set('valid_items', $this->pageService->getValidBlockItems($view->getBlock())); } }