Example #1
0
 public function setDocs(\TRC\CoreBundle\Entity\DDC\DDC $ddc)
 {
     $docs = $this->em->getRepository('TRCCoreBundle:DDC\\DOCTDC')->findBy(array("tdc" => $ddc->getTdc()), array(), null, 0);
     foreach ($docs as $key => $doc) {
         $docddc = new DOCDDC();
         $docddc->setNom($doc->getNom());
         $docddc->setDdc($ddc);
         $this->em->persist($docddc);
     }
     $this->em->flush();
     return true;
 }
 /**
  * {@inheritDoc}
  */
 public function getDdc()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDdc', []);
     return parent::getDdc();
 }