Exemplo n.º 1
0
 /**
  * Saves the group and redirects to the list
  */
 protected function OnSuccess()
 {
     $action = $this->group->Exists() ? Action::Update() : Action::Create();
     $this->group->SetName($this->Value('Name'));
     $this->group->SetCreateContainers((bool) $this->Value('CreateContainers'));
     $this->group->SetCreateLayouts((bool) $this->Value('CreateLayouts'));
     $this->group->SetCreateContainers((bool) $this->Value('CreateContainers'));
     $this->group->Save();
     $logger = new Logger(self::Guard()->GetUser());
     $logger->ReportUserGroupAction($this->group, $action);
     $target = BackendRouter::ModuleUrl(new UsergroupList());
     Response::Redirect($target);
 }
Exemplo n.º 2
0
 protected function BeforeRemove(TableObject $deleteObject)
 {
     $logger = new Logger(self::Guard()->GetUser());
     $logger->ReportUserGroupAction($deleteObject, Action::Delete());
 }