createQueryBuilder('Action') ->andWhere('Action.event LIKE :eventName')->setParameter('eventName', "%{$eventName}%") ->andWhere('Action.objectClass = :objectClass')->setParameter('objectClass', $objectClass) ; return $qb->getQuery()->getResult(); } /** * @param string $eventName * @param string $workflowName * @param string $eventReference * * @return array */ public function findAllByEventAndWorkflowName($eventName, $workflowName, $eventReference) { $qb = $this->createQueryBuilder('Action') ->andWhere('Action.event LIKE :eventName')->setParameter('eventName', "%{$eventName}%") ->andWhere('Action.workflowName = :workflowName')->setParameter('workflowName', $workflowName) ->andWhere('Action.eventReference = :eventReference')->setParameter('eventReference', $eventReference) ; return $qb->getQuery()->getResult(); } }