Exemplo n.º 1
0
 /**
  * @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;
 }
Exemplo n.º 2
0
 public function __construct(AnalyticsManager $analyticsManager, IStorage $fileStorage)
 {
     parent::__construct();
     $this->analyticsManager = $analyticsManager;
     $this->cache = new Cache($fileStorage, 'GA');
     $this->setHistory();
 }
Exemplo n.º 3
0
 protected function attached($presenter)
 {
     parent::attached($presenter);
     $this->sort = $this->defaultSort + $this->sort;
     $this->filters = $this->defaultFilters + $this->filters;
     $this->onAttached($this);
 }
Exemplo n.º 4
0
 protected function attached($presenter)
 {
     parent::attached($presenter);
     $this->onAttached($this);
     if ($this->id) {
         if (!$this->repository->find($this->id)) {
             throw new BadRequestException();
         }
     }
 }
Exemplo n.º 5
0
 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);
 }
Exemplo n.º 6
0
 protected function attached($presenter)
 {
     parent::attached($presenter);
     $this->onAttached($this);
 }
Exemplo n.º 7
0
 protected function attached($presenter)
 {
     parent::attached($presenter);
     $this['table']->getTable()->setTranslator($this->presenter->context->translator->translator);
 }