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