123456789101112131415161718192021222324252627 |
- <?php
- namespace WorkflowBundle\Repository;
- use \Doctrine\ORM\EntityRepository;
- class WorkflowRepository extends EntityRepository
- {
- /**
- * @param string $class
- *
- * @return array
- */
- public function findAllByClass($class)
- {
- $results = $this->createQueryBuilder('Workflow')->getQuery()->getResult();
- foreach ($results as $key => &$result) {
- if (!in_array($class, $result->getSupport())) {
- unset($results[$key]);
- }
- }
-
- return $results;
- }
- }
|