/** * Executes an action on layout object * * @param LayoutInterface $layout * @param ProcessorInterface $processor * @return $this */ public function execute(LayoutInterface $layout, ProcessorInterface $processor) { $items = $processor->findItemsByBlockIdAndType($this->blockId, self::TYPE_LOAD); foreach ($items as $item) { $processor->removeItem($item); } return $this; }
/** * And item relation * * @param ItemInterface $item * @param string $relatedBlockIdentifier * @return $this */ public function addItemRelation(ItemInterface $item, $relatedBlockIdentifier) { if ($this->currentProcessor) { $this->currentProcessor->addItemRelation($item, $relatedBlockIdentifier); } return $this; }