class EventService (View source)

Constants

EVENT_VERSION_RECENT

EVENT_VERSION_APPROVED

INTERVAL_VERSION

Properties

protected $entityManager
protected $config
protected $occurrenceFactory
protected $eventCategory
protected $dispatcher

Methods

__construct(EntityManagerInterface $entityManagerInterface, Repository $config, EventOccurrenceFactory $occurrenceFactory, EventCategory $eventCategory, EventDispatcher $dispatcher)

No description

getByID($id, $retrieveVersion = self::EVENT_VERSION_APPROVED)

No description

getVersionByID($id)

No description

getVersionToModify(CalendarEvent $event, User $u)

Returns a new calendar event version object, duplicated from the most recent one – or if the event has no version objects simply returns a new one.

addEventVersion(CalendarEvent $event, Calendar $calendar, CalendarEventVersion $version, $repetitions = array())

No description

save(CalendarEvent $event)

No description

approve(CalendarEventVersion $version)

No description

unapprove(CalendarEvent $event)

No description

duplicate(CalendarEvent $event, User $u, Calendar $calendar = null)

No description

delete(CalendarEvent $event)

No description

deleteVersion(CalendarEventVersion $version)

No description

isRelatedTo(CalendarEvent $event1, CalendarEvent $event2)

No description

generateDefaultOccurrences(CalendarEventVersion $version)

Handles generating occurrences with the default start and end times

requireOccurrenceRegeneration($repetitions1, $repetitions2)

Returns true if the difference between the event versions impacts repetitions and occurrences.

Details

__construct(EntityManagerInterface $entityManagerInterface, Repository $config, EventOccurrenceFactory $occurrenceFactory, EventCategory $eventCategory, EventDispatcher $dispatcher)

No description

Parameters

EntityManagerInterface $entityManagerInterface
Repository $config
EventOccurrenceFactory $occurrenceFactory
EventCategory $eventCategory
EventDispatcher $dispatcher

getByID($id, $retrieveVersion = self::EVENT_VERSION_APPROVED)

No description

Parameters

$id
$retrieveVersion

getVersionByID($id)

No description

Parameters

$id

getVersionToModify(CalendarEvent $event, User $u)

Returns a new calendar event version object, duplicated from the most recent one – or if the event has no version objects simply returns a new one.

Parameters

CalendarEvent $event
User $u

addEventVersion(CalendarEvent $event, Calendar $calendar, CalendarEventVersion $version, $repetitions = array())

No description

Parameters

CalendarEvent $event
Calendar $calendar
CalendarEventVersion $version
$repetitions

save(CalendarEvent $event)

No description

Parameters

CalendarEvent $event

approve(CalendarEventVersion $version)

No description

Parameters

CalendarEventVersion $version

unapprove(CalendarEvent $event)

No description

Parameters

CalendarEvent $event

duplicate(CalendarEvent $event, User $u, Calendar $calendar = null)

No description

Parameters

CalendarEvent $event
User $u
Calendar $calendar

delete(CalendarEvent $event)

No description

Parameters

CalendarEvent $event

deleteVersion(CalendarEventVersion $version)

No description

Parameters

CalendarEventVersion $version

isRelatedTo(CalendarEvent $event1, CalendarEvent $event2)

No description

Parameters

CalendarEvent $event1
CalendarEvent $event2

generateDefaultOccurrences(CalendarEventVersion $version)

Handles generating occurrences with the default start and end times

Parameters

CalendarEventVersion $version

requireOccurrenceRegeneration($repetitions1, $repetitions2)

Returns true if the difference between the event versions impacts repetitions and occurrences.

Parameters

$repetitions1
$repetitions2