Added the UserDataSpan Twig extension
This Twig extension can filter User entities, creating a HTML <span> element from them with the class userdata, which can later be converted to an AJAX tooltip with jquery.cluetip Signed-off-by: Gergely Polonkai <polesz@w00d5t0ck.info>
This commit is contained in:
@@ -4,7 +4,9 @@ namespace KekRozsak\SecurityBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Symfony\Component\Security\Core\SecurityContext;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
@@ -121,4 +123,17 @@ class DefaultController extends Controller
|
||||
return array(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/profil/{id}/ajax-felhasznalo-info.{_format}", name="KekRozsakSecurityBundle_ajaxUserdata", requirements={"_format": "html"})
|
||||
* @Method({"GET"})
|
||||
* @Template()
|
||||
* @ParamConverter("user")
|
||||
*/
|
||||
public function ajaxUserdataAction(User $user)
|
||||
{
|
||||
return array(
|
||||
'user' => $user,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user