示例#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;
 }
示例#2
0
 public function __construct(AnalyticsManager $analyticsManager, IStorage $fileStorage)
 {
     parent::__construct();
     $this->analyticsManager = $analyticsManager;
     $this->cache = new Cache($fileStorage, 'GA');
     $this->setHistory();
 }
示例#3
0
 protected function attached($presenter)
 {
     parent::attached($presenter);
     $this->sort = $this->defaultSort + $this->sort;
     $this->filters = $this->defaultFilters + $this->filters;
     $this->onAttached($this);
 }
示例#4
0
 protected function attached($presenter)
 {
     parent::attached($presenter);
     $this->onAttached($this);
     if ($this->id) {
         if (!$this->repository->find($this->id)) {
             throw new BadRequestException();
         }
     }
 }
示例#5
0
文件: Control.php 项目: svobodni/web
 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);
 }
示例#6
0
 protected function attached($presenter)
 {
     parent::attached($presenter);
     $this->onAttached($this);
 }
示例#7
0
 protected function attached($presenter)
 {
     parent::attached($presenter);
     $this['table']->getTable()->setTranslator($this->presenter->context->translator->translator);
 }