Skip to content

Instantly share code, notes, and snippets.

Created February 17, 2014 15:53
Show Gist options
  • Save anonymous/9053094 to your computer and use it in GitHub Desktop.
Save anonymous/9053094 to your computer and use it in GitHub Desktop.
if($projects = $service->getProjects()){
//if($projects = $this->projectRepository->getAllProjectsByService($service)){
foreach($projects as $project){
foreach($project->getSlides() as $slide)
$slidearray[] = $this->formatSlide($slide);
}
}
/**
* getAllProjectsByService
*
* @param $service
* @return
*/
public function getAllProjectsByService($service) {
$query = $this->createQuery();
$query->getQuerySettings()->setRespectEnableFields(false);
return $query->matching($query->contains('service',$service))->execute();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment