Ejemplo n.º 1
0
 /**
  * @param  ChildEvent $eventRelatedByPerformanceMusicAndTimingStatisticId The ChildEvent object to remove.
  * @return $this|ChildPerformanceStatistic The current object (for fluent API support)
  */
 public function removeEventRelatedByPerformanceMusicAndTimingStatisticId(ChildEvent $eventRelatedByPerformanceMusicAndTimingStatisticId)
 {
     if ($this->getEventsRelatedByPerformanceMusicAndTimingStatisticId()->contains($eventRelatedByPerformanceMusicAndTimingStatisticId)) {
         $pos = $this->collEventsRelatedByPerformanceMusicAndTimingStatisticId->search($eventRelatedByPerformanceMusicAndTimingStatisticId);
         $this->collEventsRelatedByPerformanceMusicAndTimingStatisticId->remove($pos);
         if (null === $this->eventsRelatedByPerformanceMusicAndTimingStatisticIdScheduledForDeletion) {
             $this->eventsRelatedByPerformanceMusicAndTimingStatisticIdScheduledForDeletion = clone $this->collEventsRelatedByPerformanceMusicAndTimingStatisticId;
             $this->eventsRelatedByPerformanceMusicAndTimingStatisticIdScheduledForDeletion->clear();
         }
         $this->eventsRelatedByPerformanceMusicAndTimingStatisticIdScheduledForDeletion[] = $eventRelatedByPerformanceMusicAndTimingStatisticId;
         $eventRelatedByPerformanceMusicAndTimingStatisticId->setPerformanceMusicAndTimingStatistic(null);
     }
     return $this;
 }
 /**
  * @param  ChildEvent $event The ChildEvent object to remove.
  * @return $this|ChildUser The current object (for fluent API support)
  */
 public function removeEvent(ChildEvent $event)
 {
     if ($this->getEvents()->contains($event)) {
         $pos = $this->collEvents->search($event);
         $this->collEvents->remove($pos);
         if (null === $this->eventsScheduledForDeletion) {
             $this->eventsScheduledForDeletion = clone $this->collEvents;
             $this->eventsScheduledForDeletion->clear();
         }
         $this->eventsScheduledForDeletion[] = clone $event;
         $event->setCreator(null);
     }
     return $this;
 }