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