/** * Remove rtfPlugin of this object * through the R_issues_rtfplugin cross reference table. * * @param ChildPlugins $rtfPlugin * @return ChildIssues The current object (for fluent API support) */ public function removeRtfPlugin(ChildPlugins $rtfPlugin) { if ($this->getRtfPlugins()->contains($rtfPlugin)) { $rIssuesRtfplugin = new ChildRIssuesRtfplugin(); $rIssuesRtfplugin->setRtfPlugin($rtfPlugin); if ($rtfPlugin->isRtfIssuesLoaded()) { //remove the back reference if available $rtfPlugin->getRtfIssues()->removeObject($this); } $rIssuesRtfplugin->setRtfIssue($this); $this->removeRIssuesRtfplugin(clone $rIssuesRtfplugin); $rIssuesRtfplugin->clear(); $this->collRtfPlugins->remove($this->collRtfPlugins->search($rtfPlugin)); if (null === $this->rtfPluginsScheduledForDeletion) { $this->rtfPluginsScheduledForDeletion = clone $this->collRtfPlugins; $this->rtfPluginsScheduledForDeletion->clear(); } $this->rtfPluginsScheduledForDeletion->push($rtfPlugin); } return $this; }