public function startup() { parent::startup(); $this->loadSubject(function () { $this->redirect('SubjectsEditor:default'); }); if (!$this->user->isAllowed($this->subject)) { $this->flashError('acl.denied.subject'); $this->redirect('Homepage:default'); } }
public function startup() { parent::startup(); $this->loadSchema(function () { return NULL; }); if (!($this->user->isAllowed(Acl::ADD_SCHEMA) || $this->schema && $this->user->isAllowed($this->schema))) { $this->flashError('acl.denied.schema'); $this->redirect('Homepage:default'); } }
public function startup() { parent::startup(); if (!$this->user->isRegisteredUser()) { $this->redirectToAuthOrRegister(); } $this->loadBlueprint(function () { return NULL; }); if (!($this->user->isAllowed(Acl::ADD_CONTENT) || $this->blueprint && $this->user->isAllowed($this->blueprint))) { $this->flashError('acl.denied.blueprint'); $this->redirect('Homepage:default'); } }
public function startup() { parent::startup(); $this->loadBlock(); $this->loadSchema(function () { $schema = $this->block->getRandomParent(); if ($schema) { $this->redirectToEntity($this->block, $schema); } }); if ($this->schema && !$this->schema->contains($this->block)) { $this->redirectToEntity($this->block); } $this->checkSlug($this->block); }
public function startup() { parent::startup(); $this->loadBlock(function () { return NULL; }); $this->loadSchema(function () { return NULL; }); if ($this->block && $this->schema && !$this->schema->contains($this->block)) { $this->error(); } if (!($this->user->isAllowed(Acl::ADD_BLOCK) || $this->block && $this->user->isAllowed($this->block))) { $this->flashError('acl.denied.block'); $this->redirect('Homepage:default'); } }
public function startup() { parent::startup(); if (!$this->userId) { if ($this->user->isRegisteredUser()) { $this->profile = $this->userEntity; } else { if ($this->user->isPersistedGuest()) { $this->redirectToRegistration(); } else { $this->redirectToAuth(); } } } else { if (!($this->profile = $this->orm->users->getById($this->userId))) { $this->error(); } } }
public function startup() { parent::startup(); Debugger::$productionMode = TRUE; }
public function startup() { parent::startup(); $this->loadSchema(); $this->checkSlug($this->schema); }
public function startup() { parent::startup(); $this->loadVideo(); }