<?phpdeclare(strict_types=1);namespace App\Repository\Configurator;use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;final class LibraryRepository extends EntityRepository{ public function findByPhrase(string $phrase): array { return $this->createQueryBuilder('library') ->leftJoin('library.translations', 'translation') ->andWhere('translation.name LIKE :phrase') ->setParameter('phrase', '%' . $phrase . '%') ->getQuery() ->getResult() ; }}