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(); }
public function __construct(IStorage $storage) { $this->storage = $storage; $this->dropbox = new \Dropbox\Client($this->storage->get('accessToken'), 'Texist'); }
public function renderDefault() { $this->template->initialized = $this->storage->isInitialized(); }