main/core/Controller/APINew/User/OrganizationController.php
public function addManagersAction(Organization $organization, Request $request)
    {
        $users = $this->decodeIdsString($request, 'Claroline\CoreBundle\Entity\User');
        $this->crud->patch($organization, 'administrator', Crud::COLLECTION_ADD, $users);

        return new JsonResponse($this->serializer->serialize($organization));
    }
public function addManagersAction(Organization $organization, Request $request)
    {
        $users = $this->decodeIdsString($request, 'Claroline\CoreBundle\Entity\User');
        $this->crud->patch($organization, 'administrator', Crud::COLLECTION_ADD, $users);

        return new JsonResponse($this->serializer->serialize($organization));
    }
public function addManagersAction ( Organization $ organization , Request $ request ) { $ users = $ this -> decodeIdsString ( $ request , 'Claroline\CoreBundle\Entity\User' ) ; $ this -> crud -> patch ( $ organization , 'administrator' , Crud :: COLLECTION_ADD , $ users ) ; return new JsonResponse ( $ this -> serializer -> serialize ( $ organization ) ) ; }
Adds managers to the collection.

@Route("/{id}/manager", name="apiv2_organization_add_managers")
@Method("PATCH")
@ParamConverter("organization", options={"mapping": {"id": "uuid"}})

@param Organization $organization
@param Request      $request

@return JsonResponse
Adds managers to the collection .