protected function OnSuccess()
    {
        $action = Action::Update();
        $isNew = !$this->layout->Exists();
        if ($isNew)
        {
            $action = Action::Create();
            $this->layout->SetUser(self::Guard()->GetUser());
        }
        $oldFile = $isNew ? '' : PathUtil::LayoutTemplate($this->layout);
        $this->layout->SetName($this->Value('Name'));
        $this->layout->Save();
        $logger = new Logger(self::Guard()->GetUser());
        $logger->ReportLayoutAction($this->layout, $action);
        if ($this->CanAssignGroup())
        {
            $this->SaveRights();
        }
        if ($isNew)
        {
            $this->SaveAreas();
        }
        $this->UpdateFiles($oldFile);
        $args = array('layout'=>$this->layout->GetID());
        Response::Redirect(BackendRouter::ModuleUrl(new AreaList(), $args));
    }
protected function OnSuccess()
    {
        $action = Action::Update();
        $isNew = !$this->layout->Exists();
        if ($isNew)
        {
            $action = Action::Create();
            $this->layout->SetUser(self::Guard()->GetUser());
        }
        $oldFile = $isNew ? '' : PathUtil::LayoutTemplate($this->layout);
        $this->layout->SetName($this->Value('Name'));
        $this->layout->Save();
        $logger = new Logger(self::Guard()->GetUser());
        $logger->ReportLayoutAction($this->layout, $action);
        if ($this->CanAssignGroup())
        {
            $this->SaveRights();
        }
        if ($isNew)
        {
            $this->SaveAreas();
        }
        $this->UpdateFiles($oldFile);
        $args = array('layout'=>$this->layout->GetID());
        Response::Redirect(BackendRouter::ModuleUrl(new AreaList(), $args));
    }
protected function OnSuccess ( ) { $ action = Action :: Update ( ) ; $ isNew = ! $ this -> layout -> Exists ( ) ; if ( $ isNew ) { $ action = Action :: Create ( ) ; $ this -> layout -> SetUser ( self :: Guard ( ) -> GetUser ( ) ) ; } $ oldFile = $ isNew ? '' : PathUtil :: LayoutTemplate ( $ this -> layout ) ; $ this -> layout -> SetName ( $ this -> Value ( 'Name' ) ) ; $ this -> layout -> Save ( ) ; $ logger = new Logger ( self :: Guard ( ) -> GetUser ( ) ) ; $ logger -> ReportLayoutAction ( $ this -> layout , $ action ) ; if ( $ this -> CanAssignGroup ( ) ) { $ this -> SaveRights ( ) ; } if ( $ isNew ) { $ this -> SaveAreas ( ) ; } $ this -> UpdateFiles ( $ oldFile ) ; $ args = array ( 'layout' => $ this -> layout -> GetID ( ) ) ; Response :: Redirect ( BackendRouter :: ModuleUrl ( new AreaList ( ) , $ args ) ) ; }
Saves the layout
Saves the layout