class OutlookCalendarSaveEventService

Service that handles to saving of events in Outlook.

Properties

protected ImmutableConfig $config

The module config.

protected EmailValidatorInterface $emailValidator

The email validator.

protected EntityFieldManagerInterface $entityFieldManager

The entity field manager.

protected GraphService $graphService

The o365 Graph service.

protected MessengerInterface $messenger

The Drupal messenger.

Methods

__construct(GraphService $graphService, ConfigFactoryInterface $configFactory, EmailValidatorInterface $emailValidator, MessengerInterface $messenger, EntityFieldManagerInterface $entityFieldManager)

Constructor for the OutlookCalendarSaveEventService service.

bool|string
addEvent(FieldableEntityInterface $entity, string $attendees = '', bool $returnLink = FALSE)

Add the event to Outlook.

array
getCalendarFormFields()

Generate the calendar form fields.

array
getEntityTypeFields(string $contentType)

Get all fields in a certain content type.

Details

at line 70
__construct(GraphService $graphService, ConfigFactoryInterface $configFactory, EmailValidatorInterface $emailValidator, MessengerInterface $messenger, EntityFieldManagerInterface $entityFieldManager)

Constructor for the OutlookCalendarSaveEventService service.

Parameters

GraphService $graphService

The graph service.

ConfigFactoryInterface $configFactory

The config factory.

EmailValidatorInterface $emailValidator

The email validator.

MessengerInterface $messenger

The Drupal messenger service.

EntityFieldManagerInterface $entityFieldManager

The entity field manager.

at line 162
bool|string addEvent(FieldableEntityInterface $entity, string $attendees = '', bool $returnLink = FALSE)

Add the event to Outlook.

Parameters

FieldableEntityInterface $entity

The entity that contains the event values.

string $attendees

The comma seperated string of attendees.

bool $returnLink

If we want to return the weblink. If true, no messages are logged.

Return Value

bool|string

The web link or TRUE/FALSE.

Exceptions

TempStoreException
GuzzleException
IdentityProviderException

at line 84
array getCalendarFormFields()

Generate the calendar form fields.

Return Value

array

The list of fields.

at line 121
array getEntityTypeFields(string $contentType)

Get all fields in a certain content type.

Parameters

string $contentType

The content type.

Return Value

array

The list of fields.