/** * Remove skill of this object * through the kk_trixionary_skill_group cross reference table. * * @param ChildSkill $skill * @return ChildGroup The current object (for fluent API support) */ public function removeSkill(ChildSkill $skill) { if ($this->getSkills()->contains($skill)) { $skillGroup = new ChildSkillGroup(); $skillGroup->setSkill($skill); if ($skill->isGroupsLoaded()) { //remove the back reference if available $skill->getGroups()->removeObject($this); } $skillGroup->setGroup($this); $this->removeSkillGroup(clone $skillGroup); $skillGroup->clear(); $this->collSkills->remove($this->collSkills->search($skill)); if (null === $this->skillsScheduledForDeletion) { $this->skillsScheduledForDeletion = clone $this->collSkills; $this->skillsScheduledForDeletion->clear(); } $this->skillsScheduledForDeletion->push($skill); } return $this; }
/** * @param ChildSkill $rootSkill The ChildSkill object to remove. * @return $this|ChildKstruktur The current object (for fluent API support) */ public function removeRootSkill(ChildSkill $rootSkill) { if ($this->getRootSkills()->contains($rootSkill)) { $pos = $this->collRootSkills->search($rootSkill); $this->collRootSkills->remove($pos); if (null === $this->rootSkillsScheduledForDeletion) { $this->rootSkillsScheduledForDeletion = clone $this->collRootSkills; $this->rootSkillsScheduledForDeletion->clear(); } $this->rootSkillsScheduledForDeletion[] = $rootSkill; $rootSkill->setKstrukturRoot(null); } return $this; }
/** * @param ChildSkill $skill The ChildSkill object to remove. * @return $this|ChildObject The current object (for fluent API support) */ public function removeSkill(ChildSkill $skill) { if ($this->getSkills()->contains($skill)) { $pos = $this->collSkills->search($skill); $this->collSkills->remove($pos); if (null === $this->skillsScheduledForDeletion) { $this->skillsScheduledForDeletion = clone $this->collSkills; $this->skillsScheduledForDeletion->clear(); } $this->skillsScheduledForDeletion[] = $skill; $skill->setObject(null); } return $this; }
/** * @param ChildSkill $skillRelatedByEndPositionId The ChildSkill object to remove. * @return $this|ChildPosition The current object (for fluent API support) */ public function removeSkillRelatedByEndPositionId(ChildSkill $skillRelatedByEndPositionId) { if ($this->getSkillsRelatedByEndPositionId()->contains($skillRelatedByEndPositionId)) { $pos = $this->collSkillsRelatedByEndPositionId->search($skillRelatedByEndPositionId); $this->collSkillsRelatedByEndPositionId->remove($pos); if (null === $this->skillsRelatedByEndPositionIdScheduledForDeletion) { $this->skillsRelatedByEndPositionIdScheduledForDeletion = clone $this->collSkillsRelatedByEndPositionId; $this->skillsRelatedByEndPositionIdScheduledForDeletion->clear(); } $this->skillsRelatedByEndPositionIdScheduledForDeletion[] = $skillRelatedByEndPositionId; $skillRelatedByEndPositionId->setEndPosition(null); } return $this; }
/** * @param ChildSkill $featuredSkill The ChildSkill object to remove. * @return $this|ChildPicture The current object (for fluent API support) */ public function removeFeaturedSkill(ChildSkill $featuredSkill) { if ($this->getFeaturedSkills()->contains($featuredSkill)) { $pos = $this->collFeaturedSkills->search($featuredSkill); $this->collFeaturedSkills->remove($pos); if (null === $this->featuredSkillsScheduledForDeletion) { $this->featuredSkillsScheduledForDeletion = clone $this->collFeaturedSkills; $this->featuredSkillsScheduledForDeletion->clear(); } $this->featuredSkillsScheduledForDeletion[] = $featuredSkill; $featuredSkill->setFeaturedPicture(null); } return $this; }