private function SaveRights()
    {
        $groupID = $this->Value('UserGroup');
        $userGroup = Usergroup::Schema()->ByID($groupID);
        $this->container->SetUserGroup($userGroup);
        if (!$userGroup)
        {
            $oldRights = $this->container->GetUserGroupRights();
            if ($oldRights)
            {
                $oldRights->GetContentRights()->Delete();
            }
            $this->container->SetUserGroupRights(null);
        }
        else
        {
            $this->container->SetUserGroup($userGroup);
            $this->containerRights->Save();
            $this->container->SetUserGroupRights($this->containerRights->Rights());
        }
        $this->container->Save();
    }
private function SaveRights()
    {
        $groupID = $this->Value('UserGroup');
        $userGroup = Usergroup::Schema()->ByID($groupID);
        $this->container->SetUserGroup($userGroup);
        if (!$userGroup)
        {
            $oldRights = $this->container->GetUserGroupRights();
            if ($oldRights)
            {
                $oldRights->GetContentRights()->Delete();
            }
            $this->container->SetUserGroupRights(null);
        }
        else
        {
            $this->container->SetUserGroup($userGroup);
            $this->containerRights->Save();
            $this->container->SetUserGroupRights($this->containerRights->Rights());
        }
        $this->container->Save();
    }
private function SaveRights ( ) { $ groupID = $ this -> Value ( 'UserGroup' ) ; $ userGroup = Usergroup :: Schema ( ) -> ByID ( $ groupID ) ; $ this -> container -> SetUserGroup ( $ userGroup ) ; if ( ! $ userGroup ) { $ oldRights = $ this -> container -> GetUserGroupRights ( ) ; if ( $ oldRights ) { $ oldRights -> GetContentRights ( ) -> Delete ( ) ; } $ this -> container -> SetUserGroupRights ( null ) ; } else { $ this -> container -> SetUserGroup ( $ userGroup ) ; $ this -> containerRights -> Save ( ) ; $ this -> container -> SetUserGroupRights ( $ this -> containerRights -> Rights ( ) ) ; } $ this -> container -> Save ( ) ; }
Saves group and rights
Saves group and rights