/** * Removes the template if necessary */ protected function BeforeInit() { if ($this->RemoveTemplate()) { Response::Redirect(Request::Uri()); return true; } parent::BeforeInit(); }
/** * Can be used to add logic after deletion in using classes; * by default, it redirects to the current url */ protected function AfterRemove() { Response::Redirect(Request::Uri()); return true; }
/** * The current uri (without base url) * @return string Returns the current uri */ function CurrentUri() { return Request::Uri(); }
/** * The backend url; CAUTION: This only works in backend pages!!! * return string */ static function BackendUrl() { return Path::Directory(Request::Uri()); }