/** * @param ChildRoutine $routine The ChildRoutine object to remove. * @return $this|ChildStartgroup The current object (for fluent API support) */ public function removeRoutine(ChildRoutine $routine) { if ($this->getRoutines()->contains($routine)) { $pos = $this->collRoutines->search($routine); $this->collRoutines->remove($pos); if (null === $this->routinesScheduledForDeletion) { $this->routinesScheduledForDeletion = clone $this->collRoutines; $this->routinesScheduledForDeletion->clear(); } $this->routinesScheduledForDeletion[] = clone $routine; $routine->setStartgroup(null); } return $this; }
/** * @param ChildRoutine $routineRelatedByPerformanceMusicAndTimingStatisticId The ChildRoutine object to remove. * @return $this|ChildPerformanceStatistic The current object (for fluent API support) */ public function removeRoutineRelatedByPerformanceMusicAndTimingStatisticId(ChildRoutine $routineRelatedByPerformanceMusicAndTimingStatisticId) { if ($this->getRoutinesRelatedByPerformanceMusicAndTimingStatisticId()->contains($routineRelatedByPerformanceMusicAndTimingStatisticId)) { $pos = $this->collRoutinesRelatedByPerformanceMusicAndTimingStatisticId->search($routineRelatedByPerformanceMusicAndTimingStatisticId); $this->collRoutinesRelatedByPerformanceMusicAndTimingStatisticId->remove($pos); if (null === $this->routinesRelatedByPerformanceMusicAndTimingStatisticIdScheduledForDeletion) { $this->routinesRelatedByPerformanceMusicAndTimingStatisticIdScheduledForDeletion = clone $this->collRoutinesRelatedByPerformanceMusicAndTimingStatisticId; $this->routinesRelatedByPerformanceMusicAndTimingStatisticIdScheduledForDeletion->clear(); } $this->routinesRelatedByPerformanceMusicAndTimingStatisticIdScheduledForDeletion[] = $routineRelatedByPerformanceMusicAndTimingStatisticId; $routineRelatedByPerformanceMusicAndTimingStatisticId->setPerformanceMusicAndTimingStatistic(null); } return $this; }