/** * @param ChildFormats $formats The ChildFormats object to remove. * @return $this|ChildBooks The current object (for fluent API support) */ public function removeFormats(ChildFormats $formats) { if ($this->getFormatss()->contains($formats)) { $pos = $this->collFormatss->search($formats); $this->collFormatss->remove($pos); if (null === $this->formatssScheduledForDeletion) { $this->formatssScheduledForDeletion = clone $this->collFormatss; $this->formatssScheduledForDeletion->clear(); } $this->formatssScheduledForDeletion[] = $formats; $formats->setBooks(null); } return $this; }
/** * Remove formats of this object * through the R_templatenames_inchapter cross reference table. * * @param ChildFormats $formats * @return ChildTemplatenames The current object (for fluent API support) */ public function removeFormats(ChildFormats $formats) { if ($this->getFormatss()->contains($formats)) { $rTemplatenamesInchapter = new ChildRTemplatenamesInchapter(); $rTemplatenamesInchapter->setFormats($formats); if ($formats->isTemplatenamessLoaded()) { //remove the back reference if available $formats->getTemplatenamess()->removeObject($this); } $rTemplatenamesInchapter->setTemplatenames($this); $this->removeRTemplatenamesInchapter(clone $rTemplatenamesInchapter); $rTemplatenamesInchapter->clear(); $this->collFormatss->remove($this->collFormatss->search($formats)); if (null === $this->formatssScheduledForDeletion) { $this->formatssScheduledForDeletion = clone $this->collFormatss; $this->formatssScheduledForDeletion->clear(); } $this->formatssScheduledForDeletion->push($formats); } return $this; }
/** * Remove formats of this object * through the R_rights_forformat cross reference table. * * @param ChildFormats $formats * @return ChildRights The current object (for fluent API support) */ public function removeFormats(ChildFormats $formats) { if ($this->getFormatss()->contains($formats)) { $rRightsForformat = new ChildRRightsForformat(); $rRightsForformat->setFormats($formats); if ($formats->isRightssLoaded()) { //remove the back reference if available $formats->getRightss()->removeObject($this); } $rRightsForformat->setRights($this); $this->removeRRightsForformat(clone $rRightsForformat); $rRightsForformat->clear(); $this->collFormatss->remove($this->collFormatss->search($formats)); if (null === $this->formatssScheduledForDeletion) { $this->formatssScheduledForDeletion = clone $this->collFormatss; $this->formatssScheduledForDeletion->clear(); } $this->formatssScheduledForDeletion->push($formats); } return $this; }