public function showAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($id);

        if (!$permissionsGroup) {
            throw $this->createNotFoundException('Unable to find PermissionsGroup entity.');
        }
        
        $translatableStringHelper = $this->get('chill.main.helper.translatable_string');
        $roleScopes = $permissionsGroup->getRoleScopes()->toArray();
        usort($roleScopes,
              function(RoleScope $a, RoleScope $b) use ($translatableStringHelper) {
                  if ($a->getScope() === NULL) {
                      return 1;
                  } 
                  if ($b->getScope() === NULL) {
                      return +1;
                  }
                  
                  return strcmp(
                        $translatableStringHelper->localize($a->getScope()->getName()),
                        $translatableStringHelper->localize($b->getScope()->getName())
                        );
              });

        return $this->render('ChillMainBundle:PermissionsGroup:show.html.twig', array(
            'entity'      => $permissionsGroup,
            'role_scopes' => $roleScopes,
            'expanded_roles' => $this->getExpandedRoles($roleScopes)
        ));
    }