plugin/result/Manager/ResultManager.php
public function getUsers(Result $result, $canEdit)
    {
        if (!$canEdit) {
            return [];
        }

        $repo = $this->om->getRepository('ClarolineCoreBundle:User');
        $roles = $result->getResourceNode()->getWorkspace()->getRoles()->toArray();
        $users = $repo->findUsersByRolesIncludingGroups($roles);

        return array_map(function ($user) {
            return [
                'id' => $user->getId(),
                'name' => "{$user->getFirstName()} {$user->getLastName()}",
            ];
        }, $users);
    }
public function getUsers(Result $result, $canEdit)
    {
        if (!$canEdit) {
            return [];
        }

        $repo = $this->om->getRepository('ClarolineCoreBundle:User');
        $roles = $result->getResourceNode()->getWorkspace()->getRoles()->toArray();
        $users = $repo->findUsersByRolesIncludingGroups($roles);

        return array_map(function ($user) {
            return [
                'id' => $user->getId(),
                'name' => "{$user->getFirstName()} {$user->getLastName()}",
            ];
        }, $users);
    }
public function getUsers ( Result $ result , $ canEdit ) { if ( ! $ canEdit ) { return [ ] ; } $ repo = $ this -> om -> getRepository ( 'ClarolineCoreBundle:User' ) ; $ roles = $ result -> getResourceNode ( ) -> getWorkspace ( ) -> getRoles ( ) -> toArray ( ) ; $ users = $ repo -> findUsersByRolesIncludingGroups ( $ roles ) ; return array_map ( function ( $ user ) { return [ 'id' => $ user -> getId ( ) , 'name' => "{$user->getFirstName()} {$user->getLastName()}" , ] ; } , $ users ) ; }
Returns an array representation of the members of the workspace
in which the given result lives. If the edit flag is set to false,
an empty array is returned.

@param Result $result
@param bool   $canEdit

@return array
Returns an array representation of the members of the workspace in which the given result lives . If the edit flag is set to false an empty array is returned .