コード例 #1
0
ファイル: PanelControl.php プロジェクト: svobodni/web
 /**
  * @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
ファイル: BaseChartControl.php プロジェクト: svobodni/web
 public function __construct(AnalyticsManager $analyticsManager, IStorage $fileStorage)
 {
     parent::__construct();
     $this->analyticsManager = $analyticsManager;
     $this->cache = new Cache($fileStorage, 'GA');
     $this->setHistory();
 }
コード例 #3
0
ファイル: TableControl.php プロジェクト: svobodni/web
 protected function attached($presenter)
 {
     parent::attached($presenter);
     $this->sort = $this->defaultSort + $this->sort;
     $this->filters = $this->defaultFilters + $this->filters;
     $this->onAttached($this);
 }
コード例 #4
0
ファイル: AdminGrid.php プロジェクト: venne/cms-module
 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
ファイル: AdminGrid.php プロジェクト: svobodni/web
 protected function attached($presenter)
 {
     parent::attached($presenter);
     $this->onAttached($this);
 }
コード例 #7
0
ファイル: RouteItemsControl.php プロジェクト: svobodni/web
 protected function attached($presenter)
 {
     parent::attached($presenter);
     $this['table']->getTable()->setTranslator($this->presenter->context->translator->translator);
 }