public function __construct(Controller $controller, Request $request, BlockInterface $block) { $this->setController($controller); $this->setRequest($request); $block->setPlugin($this); $this->setBlock($block); }
/** * Add a block * * @param BlockInterface $block * @return $this */ public function addBlock(BlockInterface $block) { $block->setPage($this); $this->blocks->add($block); return $this; }