Ejemplo n.º 1
0
 /**
  * @param    Template $template The template object to add.
  */
 protected function doAddTemplate($template)
 {
     $featureTemplate = new ChildFeatureTemplate();
     $featureTemplate->setTemplate($template);
     $this->addFeatureTemplate($featureTemplate);
     // set the back reference to this object directly as using provided method either results
     // in endless loop or in multiple relations
     if (!$template->getFeatures()->contains($this)) {
         $foreignCollection = $template->getFeatures();
         $foreignCollection[] = $this;
     }
 }