Guillermo Espinoza 8 rokov pred
rodič
commit
055d4f058f
1 zmenil súbory, kde vykonal 18 pridanie a 0 odobranie
  1. 18 0
      Repository/ActionRepository.php

+ 18 - 0
Repository/ActionRepository.php

@@ -23,4 +23,22 @@ class ActionRepository extends EntityRepository
         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();
+    }
+
 }