/** * Declares an association between this object and a ChildTemplate object. * * @param ChildTemplate $v * @return \Thelia\Model\Product The current object (for fluent API support) * @throws PropelException */ public function setTemplate(ChildTemplate $v = null) { if ($v === null) { $this->setTemplateId(NULL); } else { $this->setTemplateId($v->getId()); } $this->aTemplate = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildTemplate object, it will not be re-added. if ($v !== null) { $v->addProduct($this); } return $this; }