class AddToOutlook in Open Social 10.0.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToOutlook.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendar\AddToOutlook
- 10.3.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToOutlook.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendar\AddToOutlook
- 10.1.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToOutlook.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendar\AddToOutlook
- 10.2.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToOutlook.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendar\AddToOutlook
Provides add to Google calendar plugin.
Plugin annotation
@SocialAddToCalendar(
id = "outlook",
label = @Translation("Outlook"),
url = "https://outlook.live.com/calendar/0/deeplink/compose",
allDayFormat = "Y-m-d",
dateFormat = "Y-m-d\TH:i:s",
utcDateFormat = "Y-m-d\TH:i:s\Z"
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\social_event_addtocal\Plugin\SocialAddToCalendarBase implements SocialAddToCalendarInterface
- class \Drupal\social_event_addtocal\Plugin\SocialAddToCalendar\AddToOutlook
- class \Drupal\social_event_addtocal\Plugin\SocialAddToCalendarBase implements SocialAddToCalendarInterface
Expanded class hierarchy of AddToOutlook
File
- modules/
social_features/ social_event/ modules/ social_event_addtocal/ src/ Plugin/ SocialAddToCalendar/ AddToOutlook.php, line 21
Namespace
Drupal\social_event_addtocal\Plugin\SocialAddToCalendarView source
class AddToOutlook extends SocialAddToCalendarBase {
/**
* {@inheritdoc}
*/
public function generateUrl(NodeInterface $node) {
$settings = $this
->generateSettings($node);
$options = [
'query' => [
'path' => '/calendar/action/compose',
'rru' => 'addevent',
'subject' => $settings['title'],
'startdt' => $settings['dates']['start'],
'enddt' => $settings['dates']['end'],
'allday' => $settings['dates']['all_day'] ? 'true' : 'false',
'body' => $settings['description'],
'location' => $settings['location'],
],
'attributes' => [
'target' => '_blank',
],
];
return Url::fromUri($this->pluginDefinition['url'], $options);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AddToOutlook:: |
public | function |
Returns the 'Add to calendar' link. Overrides SocialAddToCalendarBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
2 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
PluginBase:: |
public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | 98 |
SocialAddToCalendarBase:: |
public | function |
Returns array of event settings for url options. Overrides SocialAddToCalendarInterface:: |
|
SocialAddToCalendarBase:: |
public | function |
Returns array of event dates for calendar. Overrides SocialAddToCalendarInterface:: |
|
SocialAddToCalendarBase:: |
public | function |
Returns the event description for calendar. Overrides SocialAddToCalendarInterface:: |
|
SocialAddToCalendarBase:: |
public | function |
Returns the event location for calendar. Overrides SocialAddToCalendarInterface:: |
|
SocialAddToCalendarBase:: |
public | function |
Returns plugin name for label. Overrides SocialAddToCalendarInterface:: |