limit amount of items in calendar drag and drop boxes (#2291)
This commit is contained in:
@@ -23,10 +23,15 @@ final class CalendarDragAndDropSourceEvent extends Event
|
||||
* @var DragAndDropSource[]
|
||||
*/
|
||||
private $sources = [];
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $maxEntries = 0;
|
||||
|
||||
public function __construct(User $user)
|
||||
public function __construct(User $user, int $maxEntries)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->maxEntries = $maxEntries;
|
||||
}
|
||||
|
||||
public function getUser(): User
|
||||
@@ -34,6 +39,11 @@ final class CalendarDragAndDropSourceEvent extends Event
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
public function getMaxEntries(): int
|
||||
{
|
||||
return $this->maxEntries;
|
||||
}
|
||||
|
||||
public function addSource(DragAndDropSource $source): CalendarDragAndDropSourceEvent
|
||||
{
|
||||
$this->sources[] = $source;
|
||||
|
||||
Reference in New Issue
Block a user