added event for recent activities (#2254)

This commit is contained in:
Kevin Papst
2021-01-11 19:13:14 +01:00
committed by GitHub
parent 1de6b5d385
commit cb6924e6d6
7 changed files with 180 additions and 17 deletions

View File

@@ -41,11 +41,23 @@ final class CalendarDragAndDropSourceEvent extends Event
return $this;
}
public function removeSource(DragAndDropSource $source): bool
{
$key = array_search($source, $this->sources, true);
if (false === $key) {
return false;
}
unset($this->sources[$key]);
return true;
}
/**
* @return DragAndDropSource[]
*/
public function getSources(): array
{
return $this->sources;
return array_values($this->sources);
}
}