Beispiel #1
0
 /**
  * Finds all services with a given scope tag
  * @param \Scope $scope 
  * @return array collection of services with specified scope
  */
 public function getServicesFromScope(\Scope $scope)
 {
     $dql = "SELECT se\n                FROM Service se\n                JOIN se.scopes sc\n                WHERE sc.id = :id\n                ORDER BY se.hostName";
     $query = $this->em->createQuery($dql)->setParameter(":id", $scope->getId());
     return $query->getResult();
 }