mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 10:33:49 +00:00
improve layout
This commit is contained in:
@@ -29,6 +29,7 @@ use Chill\PersonBundle\Form\CreationPersonType;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
|
||||
class PersonController extends Controller
|
||||
{
|
||||
@@ -281,9 +282,17 @@ class PersonController extends Controller
|
||||
|
||||
if ($this->container
|
||||
->getParameter('cl_chill_person.search.use_double_metaphone')) {
|
||||
$dql .= ' OR DOUBLEMETAPHONE(p.lastName) LIKE DOUBLEMETAPHONE(:lastName)';
|
||||
$dql .= ' OR DOUBLEMETAPHONE(p.lastName) LIKE DOUBLEMETAPHONE(:lastName) ';
|
||||
}
|
||||
|
||||
// add authorized centers
|
||||
$centers = $this->get('chill.main.security.authorization.helper')
|
||||
->getReachableCenters($this->getUser(), new Role(PersonVoter::SEE));
|
||||
|
||||
$dql.=' and p.center IN (:centers) ';
|
||||
$query->setParameter('centers', $centers);
|
||||
|
||||
// run query
|
||||
$query->setDql($dql);
|
||||
|
||||
$alternatePersons = $query->getResult();
|
||||
|
Reference in New Issue
Block a user