Skip to content

Instantly share code, notes, and snippets.

@cedricziel
Forked from anonymous/gist:9053094
Last active August 29, 2015 13:56
Show Gist options
  • Save cedricziel/9053399 to your computer and use it in GitHub Desktop.
Save cedricziel/9053399 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 \Foo\Domain\Model\Service $service
* @return
*/
public function getAllProjectsByService(\Foo\Domain\Model\Service $service) {
$query = $this->createQuery();
$query->getQuerySettings()->setRespectEnableFields(false);
$query->matching($query->contains('service',$service));
DebuggerUtility::var_dump($query);
return->execute();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment