src/Service/RetrieveClients.php line 17
<?phpnamespace App\Service;use App\Entity\CustomerControl;use App\Entity\User;use Doctrine\ORM\EntityManagerInterface;use Symfony\Bundle\SecurityBundle\Security;use Symfony\Component\HttpFoundation\RequestStack;class RetrieveClients{public function __construct(private Security $security,RequestStack $requestStack) {$this->requestStack = $requestStack;}public function retrieveAllClients(EntityManagerInterface $manager){$infoCommercial = [];$clients = $manager->getRepository(User::class)->getAllInformationsForAllUser();$infoCommercial['clients'] = $clients;$checkControl = $manager->getRepository(CustomerControl::class)->findOneBy(array('user' => $this->security->getUser(), 'finish' => false));if (!$checkControl) {$checkControl = null;}$infoCommercial['infocommercial'] = $checkControl;return $infoCommercial;}}