public function followerResourcesToggleAction($mode, User $user, Request $request)
    {
        $nodes = $this->decodeIdsString($request, 'Claroline\CoreBundle\Entity\Resource\ResourceNode');
        $this->manager->toggleFollowResources($user, $nodes, $mode);

        return new JsonResponse(array_map(function (ResourceNode $resourceNode) {
            return $this->serializer->serialize($resourceNode);
        }, $nodes));
    }
public function followerResourcesToggleAction($mode, User $user, Request $request)
    {
        $nodes = $this->decodeIdsString($request, 'Claroline\CoreBundle\Entity\Resource\ResourceNode');
        $this->manager->toggleFollowResources($user, $nodes, $mode);

        return new JsonResponse(array_map(function (ResourceNode $resourceNode) {
            return $this->serializer->serialize($resourceNode);
        }, $nodes));
    }
public function followerResourcesToggleAction ( $ mode , User $ user , Request $ request ) { $ nodes = $ this -> decodeIdsString ( $ request , 'Claroline\CoreBundle\Entity\Resource\ResourceNode' ) ; $ this -> manager -> toggleFollowResources ( $ user , $ nodes , $ mode ) ; return new JsonResponse ( array_map ( function ( ResourceNode $ resourceNode ) { return $ this -> serializer -> serialize ( $ resourceNode ) ; } , $ nodes ) ) ; }
Follows or unfollows resources.

@EXT\Route("resources/toggle/{mode}", name="icap_notification_follower_resources_toggle")
@EXT\Method("PUT")
@EXT\ParamConverter("user", converter="current_user", options={"allowAnonymous"=false})

@param string  $mode
@param User    $user
@param Request $request

@return JsonResponse
Follows or unfollows resources .