Bladeren bron

Merge branch 'develop'

master
Guillaume Bourgeois 11 maanden geleden
bovenliggende
commit
9a7ce75a59
4 gewijzigde bestanden met toevoegingen van 23 en 0 verwijderingen
  1. +5
    -0
      Controller/ControllerTrait.php
  2. +7
    -0
      Repository/User/UserRepositoryQuery.php
  3. +6
    -0
      Repository/User/UserStore.php
  4. +5
    -0
      Resources/assets/functions/widgets.js

+ 5
- 0
Controller/ControllerTrait.php Bestand weergeven

@@ -219,6 +219,11 @@ trait ControllerTrait
return $this->get(AdminUrlGenerator::class);
}

public function getUrlGenerator(): UrlGeneratorInterface
{
return $this->get(UrlGeneratorInterface::class);
}

public function getKernel(): KernelInterface
{
return $this->get(KernelInterface::class);

+ 7
- 0
Repository/User/UserRepositoryQuery.php Bestand weergeven

@@ -58,4 +58,11 @@ class UserRepositoryQuery extends AbstractRepositoryQuery implements UserReposit
->setParameter('email', $email);
}

public function filterByTerm(string $term): self
{
return $this
->andWhere('.email LIKE :term OR .firstname LIKE :term OR .lastname LIKE :term')
->setParameter('term', '%'.$term.'%');
}

}

+ 6
- 0
Repository/User/UserStore.php Bestand weergeven

@@ -62,4 +62,10 @@ class UserStore extends AbstractStore implements UserStoreInterface
return $query->findOne();
}

public function getByTerm(string $term, $query = null)
{
$query = $this->createQuery($query);
$query->filterByTerm($term);
return $query->find();
}
}

+ 5
- 0
Resources/assets/functions/widgets.js Bestand weergeven

@@ -12,6 +12,11 @@ export class SovWidgets {
minimumResultsForSearch: 8
};

if ($select.data('ajax')) {
options.ajax = $select.data('ajax');
options.minimumInputLength = 3;
}

if ($select.data('allow-clear') == 'false') {
options.allowClear = false;
}

Laden…
Annuleren
Opslaan