public function avatarAction ()
    {
        $finder = new Finder();
        $result = array();
        $finder->files()->in(__DIR__.'/../Resources/public/avatar')->name('*.png');
        foreach ($finder as $files) {
            $result[$files->getRelativePath()][] = $files->getRelativePathname();
        }
        $user = $this->getUser();
        $gravatar = new Gravatar();
        $gravatar->setAvatarSize(150);
        return $this->render('OlixSecurityBundle:Profile:avatar.html.twig', array(
            'avatars' => $result,
            'gravatar' => $gravatar->get($user->getEmail()),
        ));
    }
public function avatarAction ()
    {
        $finder = new Finder();
        $result = array();
        $finder->files()->in(__DIR__.'/../Resources/public/avatar')->name('*.png');
        foreach ($finder as $files) {
            $result[$files->getRelativePath()][] = $files->getRelativePathname();
        }
        $user = $this->getUser();
        $gravatar = new Gravatar();
        $gravatar->setAvatarSize(150);
        return $this->render('OlixSecurityBundle:Profile:avatar.html.twig', array(
            'avatars' => $result,
            'gravatar' => $gravatar->get($user->getEmail()),
        ));
    }
public function avatarAction ( ) { $ finder = new Finder ( ) ; $ result = array ( ) ; $ finder -> files ( ) -> in ( __DIR__ . '/../Resources/public/avatar' ) -> name ( '*.png' ) ; foreach ( $ finder as $ files ) { $ result [ $ files -> getRelativePath ( ) ] [ ] = $ files -> getRelativePathname ( ) ; } $ user = $ this -> getUser ( ) ; $ gravatar = new Gravatar ( ) ; $ gravatar -> setAvatarSize ( 150 ) ; return $ this -> render ( 'OlixSecurityBundle:Profile:avatar.html.twig' , array ( 'avatars' => $ result , 'gravatar' => $ gravatar -> get ( $ user -> getEmail ( ) ) , ) ) ; }
Affichage de la liste des avatars disponibles dans un popup

@return \Symfony\Component\HttpFoundation\Response
Affichage de la liste des avatars disponibles dans un popup