/** * Initialize the page. * * @param IPageFactory $page_factory Page factory. */ public function __construct(IPageFactory $page_factory) { parent::__construct($page_factory->getSession()); $this->pageFactory = $page_factory; $this->pageFactory->initPage($this)->initElements($this, $this->pageFactory->createDecorator($this)); }
/** * @param Session $session * @param Factory $factory * @param array $parameters */ public function __construct(Session $session, Factory $factory, array $parameters = array()) { parent::__construct($session); $this->factory = $factory; $this->parameters = $parameters; }