protected function BeforeInit() { if (!self::Guard()->Allow(BackendAction::Read(), $this)) { //TODO: message Response::Redirect(BackendRouter::ModuleUrl(new Overview())); return false; } return parent::BeforeInit(); }
/** * Gets cache content if necessary * @return boolean */ protected function BeforeInit() { //todo: check access rights $cacheFile = PathUtil::ContentCacheFile($this); $this->fileCacher = new FileCacher($cacheFile, $this->content->GetCacheLifetime()); if ($this->fileCacher->MustUseCache()) { $this->output = $this->fileCacher->GetFromCache(); return true; } return parent::BeforeInit(); }