public function getByStructure(Structure $structure) { return $this->em->getRepository('gries\\MControl\\Builder\\Block')->findOneBy(array('structure_id' => $structure->getId())); }