/** * @param TemplateManager $templateManager * @param SessionSection $session * @param ContentManager $contentManager */ public function __construct(TemplateManager $templateManager, SessionSection $session, ContentManager $contentManager) { parent::__construct(); $this->templateManager = $templateManager; $this->session = $session; $this->contentManager = $contentManager; }
public function __construct(AnalyticsManager $analyticsManager, IStorage $fileStorage) { parent::__construct(); $this->analyticsManager = $analyticsManager; $this->cache = new Cache($fileStorage, 'GA'); $this->setHistory(); }
protected function attached($presenter) { parent::attached($presenter); $this->sort = $this->defaultSort + $this->sort; $this->filters = $this->defaultFilters + $this->filters; $this->onAttached($this); }
protected function attached($presenter) { parent::attached($presenter); $this->onAttached($this); if ($this->id) { if (!$this->repository->find($this->id)) { throw new BadRequestException(); } } }
public function __call($name, $args) { if ($name === 'render') { if (isset($args[0]) && is_array($args[0]) && isset($args[0]['config'])) { $this->configureControl($args[0]['config']); } if (method_exists($this, 'renderDefault')) { call_user_func_array(array($this, 'renderDefault'), $args); } $this->template->setFile($this->formatTemplateFile()); $this->template->render(); if (method_exists($this, 'afterRender')) { call_user_func_array(array($this, 'afterRender'), array()); } if (isset($args[0]) && is_array($args[0]) && isset($args[0]['config'])) { $this->unconfigureControl(); } return; } return parent::__call($name, $args); }
protected function attached($presenter) { parent::attached($presenter); $this->onAttached($this); }
protected function attached($presenter) { parent::attached($presenter); $this['table']->getTable()->setTranslator($this->presenter->context->translator->translator); }