private function HandlePost() { if (Request::PostData($this->triggerName)) { self::Guard()->Logout(); Response::Redirect($this->RedirectUrl()); } }
/** * Gets the posted value of the name, optional name prefix automatically attached * @param string $name The checkbox name without prefix */ protected function Value($name) { if (Request::IsPost()) { return (bool) trim(Request::PostData($this->namePrefix . $name)); } if ($this->Rights()) { return $this->Rights()->{$name}; } if ($this->ParentRights()) { return $this->ParentRights()->{$name}; } return false; }
/** * Gets the member group for removal if delete id is posted * @return MembergroupList */ protected function RemovalObject() { $id = Request::PostData('delete'); return $id ? new Membergroup($id) : null; }
/** * Adds the locked field */ private function AddPasswordRepeatField() { $name = 'PasswordRepeat'; $this->AddField(Input::Password($name)); if (Request::PostData('Password')) { $this->SetRequired($name); $this->AddValidator($name, CompareCheck::Equals($this->Value('Password'))); } }
private function RemoveTemplate() { $id = Request::PostData('delete'); if (!$id) { return false; } $idParts = \explode('/', $id); $module = $this->RemovalTemplateModule($idParts); $templateName = trim($idParts[1]); if (!$module || !$templateName) { return false; } $logger = new Logger(self::Guard()->GetUser()); $logger->ReportTemplateAction($module->MyType(), $templateName, Action::Delete()); $folder = PathUtil::ModuleCustomTemplatesFolder($module); $template = Path::Combine($folder, Path::AddExtension($templateName, 'phtml')); if (File::Exists($template)) { File::Delete($template); } $this->DeleteUsages($module, $templateName); return true; }
/** * Gets the layout that is requested to be removed * @return Layout The removal layout */ protected function RemovalObject() { $id = Request::PostData('delete'); return $id ? Layout::Schema()->ByID($id) : null; }
/** * Gets the container that is requested to be removed * @return Container The removal container */ protected function RemovalObject() { $id = Request::PostData('delete'); return $id ? new Container($id) : null; }
/** * Gets the value by pure name * @param string $name The name without prefix * @return string Returns the value */ private function Value($name) { $value = Request::PostData($this->prefix . $name); return String::Trim($value); }
private function InsertAfter() { $previous = $this->TableSchema()->ByKeyValue(Request::PostData('previous')); $this->tree->Insert($this->item, null, $previous); }
/** * Gets the value of a field * @param string $field The field name * @param bool $trim True if the value shall be trimmed by whitespace characters */ function Value($field, $trim = true) { $result = Request::IsPost() ? Request::PostData($field) : $this->DefaultValue($field); if ($trim) { return trim($result); } return $result; }