src/Kunstmaan/PagePartBundle/Helper/Services/PagePartCreatorService.php
public function setEntityManager(EntityManagerInterface $em)
    {
        $this->em = $em;
        // Because these repositories are shared between the different functions it's
        // easier to make them available in the class.
        $this->pagePartRepo = $em->getRepository('KunstmaanPagePartBundle:PagePartRef');
        $this->translationRepo = $em->getRepository('KunstmaanNodeBundle:NodeTranslation');
        $this->nodeRepo = $em->getRepository('KunstmaanNodeBundle:Node');
    }
public function setEntityManager(EntityManagerInterface $em)
    {
        $this->em = $em;
        // Because these repositories are shared between the different functions it's
        // easier to make them available in the class.
        $this->pagePartRepo = $em->getRepository('KunstmaanPagePartBundle:PagePartRef');
        $this->translationRepo = $em->getRepository('KunstmaanNodeBundle:NodeTranslation');
        $this->nodeRepo = $em->getRepository('KunstmaanNodeBundle:Node');
    }
public function setEntityManager ( EntityManagerInterface $ em ) { $ this -> em = $ em ; // Because these repositories are shared between the different functions it's // easier to make them available in the class. $ this -> pagePartRepo = $ em -> getRepository ( 'KunstmaanPagePartBundle:PagePartRef' ) ; $ this -> translationRepo = $ em -> getRepository ( 'KunstmaanNodeBundle:NodeTranslation' ) ; $ this -> nodeRepo = $ em -> getRepository ( 'KunstmaanNodeBundle:Node' ) ; }
Sets the EntityManager dependency.

@param EntityManagerInterface $em
Sets the EntityManager dependency .