Exemplo n.º 1
0
 public function beforeRender()
 {
     parent::beforeRender();
     if ($this->getName() != 'Sign' and $this->getName() != 'Init') {
         if (!$this->storage->isInitialized()) {
             $this->redirect(302, 'Init:default');
         }
     }
     $this->template->loggedIn = $this->getUser()->isLoggedIn();
     $this->template->url = $this->context->httpRequest->getUrl()->getAbsoluteUrl();
     $this->template->presenter = $this->getName();
 }
Exemplo n.º 2
0
 public function __construct(IStorage $storage)
 {
     $this->storage = $storage;
     $this->dropbox = new \Dropbox\Client($this->storage->get('accessToken'), 'Texist');
 }
Exemplo n.º 3
0
 public function renderDefault()
 {
     $this->template->initialized = $this->storage->isInitialized();
 }