main/core/Controller/APINew/Model/HasGroupsTrait.php
public function removeGroupsAction($id, $class, Request $request)
    {
        $object = $this->find($class, $id);
        $groups = $this->decodeIdsString($request, 'Claroline\CoreBundle\Entity\Group');
        $this->crud->patch($object, 'group', Crud::COLLECTION_REMOVE, $groups);

        return new JsonResponse($this->serializer->serialize($object));
    }
public function removeGroupsAction($id, $class, Request $request)
    {
        $object = $this->find($class, $id);
        $groups = $this->decodeIdsString($request, 'Claroline\CoreBundle\Entity\Group');
        $this->crud->patch($object, 'group', Crud::COLLECTION_REMOVE, $groups);

        return new JsonResponse($this->serializer->serialize($object));
    }
public function removeGroupsAction ( $ id , $ class , Request $ request ) { $ object = $ this -> find ( $ class , $ id ) ; $ groups = $ this -> decodeIdsString ( $ request , 'Claroline\CoreBundle\Entity\Group' ) ; $ this -> crud -> patch ( $ object , 'group' , Crud :: COLLECTION_REMOVE , $ groups ) ; return new JsonResponse ( $ this -> serializer -> serialize ( $ object ) ) ; }
Removes groups from the collection.

@EXT\Route("/{id}/group")
@EXT\Method("DELETE")

@param string  $id
@param string  $class
@param Request $request

@return JsonResponse
Removes groups from the collection .