public function setUp() { $eventManager = new EventManager(); $this->layoutUpdater = new LayoutUpdater(); $this->layoutUpdater->setEventManager($eventManager); $this->sm = Bootstrap::getServiceManager(); $this->em = $eventManager; $this->blockPool = new BlockPool(); $this->blockFactory = new BlockFactory([], new BlockManager(), $this->sm); $this->blocksGenerator = new BlocksGenerator($this->blockFactory, $this->blockPool); $this->layout = new Layout($this->layoutUpdater, $this->blockPool); $this->layout->attachGenerator(BlocksGenerator::NAME, $this->blocksGenerator); }
/** * @inheritDoc */ public function attachGenerator($name, GeneratorInterface $generator, $priority = 1) { $this->layout->attachGenerator($name, $generator, $priority); return $this; }