protected function OnSuccess()
    {
        $action = Action::Update();
        if (!$this->site->Exists())
        {
            $action = Action::Create();
            $this->site->SetUser(self::Guard()->GetUser());
        }
        $this->site->SetName($this->Value('Name'));
        $this->site->SetUrl($this->Value('Url'));
        $this->site->SetBaseUrl($this->Value('BaseUrl'));
        $this->site->SetLanguage(Language::Schema()->ByID($this->Value('Language')));
        $this->site->SetSitemapActive((bool)$this->Value('SitemapActive'));
        $this->site->SetSitemapCacheLifetime((int)$this->Value('SitemapCacheLifetime'));
        $this->site->Save();
        $logger = new Logger(self::Guard()->GetUser());
        $logger->ReportSiteAction($this->site, $action);
        if ($this->CanAssignGroup())
        {
            $this->SaveRights();
        }
        Response::Redirect(BackendRouter::ModuleUrl(new SiteList()));
    }
protected function OnSuccess()
    {
        $action = Action::Update();
        if (!$this->site->Exists())
        {
            $action = Action::Create();
            $this->site->SetUser(self::Guard()->GetUser());
        }
        $this->site->SetName($this->Value('Name'));
        $this->site->SetUrl($this->Value('Url'));
        $this->site->SetBaseUrl($this->Value('BaseUrl'));
        $this->site->SetLanguage(Language::Schema()->ByID($this->Value('Language')));
        $this->site->SetSitemapActive((bool)$this->Value('SitemapActive'));
        $this->site->SetSitemapCacheLifetime((int)$this->Value('SitemapCacheLifetime'));
        $this->site->Save();
        $logger = new Logger(self::Guard()->GetUser());
        $logger->ReportSiteAction($this->site, $action);
        if ($this->CanAssignGroup())
        {
            $this->SaveRights();
        }
        Response::Redirect(BackendRouter::ModuleUrl(new SiteList()));
    }
protected function OnSuccess ( ) { $ action = Action :: Update ( ) ; if ( ! $ this -> site -> Exists ( ) ) { $ action = Action :: Create ( ) ; $ this -> site -> SetUser ( self :: Guard ( ) -> GetUser ( ) ) ; } $ this -> site -> SetName ( $ this -> Value ( 'Name' ) ) ; $ this -> site -> SetUrl ( $ this -> Value ( 'Url' ) ) ; $ this -> site -> SetBaseUrl ( $ this -> Value ( 'BaseUrl' ) ) ; $ this -> site -> SetLanguage ( Language :: Schema ( ) -> ByID ( $ this -> Value ( 'Language' ) ) ) ; $ this -> site -> SetSitemapActive ( ( bool ) $ this -> Value ( 'SitemapActive' ) ) ; $ this -> site -> SetSitemapCacheLifetime ( ( int ) $ this -> Value ( 'SitemapCacheLifetime' ) ) ; $ this -> site -> Save ( ) ; $ logger = new Logger ( self :: Guard ( ) -> GetUser ( ) ) ; $ logger -> ReportSiteAction ( $ this -> site , $ action ) ; if ( $ this -> CanAssignGroup ( ) ) { $ this -> SaveRights ( ) ; } Response :: Redirect ( BackendRouter :: ModuleUrl ( new SiteList ( ) ) ) ; }
Saves the site
Saves the site