protected function removeOveriddenEvents()
	{
		// Events need to be sorted by date and id (both ascending) in order for overridden occurrences not to show
		$this->sort();

		$events = array();

		// New events array is created with the occurrence overrides replacing the relevant occurrences
		array_walk($this->allEvents, function ($event) use (&$events) {
			if ($event->getOccurrenceDate()) {
			    $events[$event->getOccurrenceDate()->format('Y-m-d H:i:s').'.'.($event->getParentId() ?: $event->getId())] = $event;
			} elseif (!isset($events[$event->getStartDate()->format('Y-m-d H:i:s').'.'.($event->getParentId() ?: $event->getId())])) {
			    $events[$event->getStartDate()->format('Y-m-d H:i:s').'.'.($event->getParentId() ?: $event->getId())] = $event;
			}
		});

		$this->allEvents = $events;
	}
protected function removeOveriddenEvents()
	{
		// Events need to be sorted by date and id (both ascending) in order for overridden occurrences not to show
		$this->sort();

		$events = array();

		// New events array is created with the occurrence overrides replacing the relevant occurrences
		array_walk($this->allEvents, function ($event) use (&$events) {
			if ($event->getOccurrenceDate()) {
			    $events[$event->getOccurrenceDate()->format('Y-m-d H:i:s').'.'.($event->getParentId() ?: $event->getId())] = $event;
			} elseif (!isset($events[$event->getStartDate()->format('Y-m-d H:i:s').'.'.($event->getParentId() ?: $event->getId())])) {
			    $events[$event->getStartDate()->format('Y-m-d H:i:s').'.'.($event->getParentId() ?: $event->getId())] = $event;
			}
		});

		$this->allEvents = $events;
	}
protected function removeOveriddenEvents ( ) { // Events need to be sorted by date and id (both ascending) in order for overridden occurrences not to show $ this -> sort ( ) ; $ events = array ( ) ; // New events array is created with the occurrence overrides replacing the relevant occurrences array_walk ( $ this -> allEvents , function ( $ event ) use ( & $ events ) { if ( $ event -> getOccurrenceDate ( ) ) { $ events [ $ event -> getOccurrenceDate ( ) -> format ( 'Y-m-d H:i:s' ) . '.' . ( $ event -> getParentId ( ) ? : $ event -> getId ( ) ) ] = $ event ; } elseif ( ! isset ( $ events [ $ event -> getStartDate ( ) -> format ( 'Y-m-d H:i:s' ) . '.' . ( $ event -> getParentId ( ) ? : $ event -> getId ( ) ) ] ) ) { $ events [ $ event -> getStartDate ( ) -> format ( 'Y-m-d H:i:s' ) . '.' . ( $ event -> getParentId ( ) ? : $ event -> getId ( ) ) ] = $ event ; } } ) ; $ this -> allEvents = $ events ; }
Removes the occurrences of recurring events that have been overridden.
Removes the occurrences of recurring events that have been overridden .