public function SocialAddToCalendarBase::generateSettings in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendarBase.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendarBase::generateSettings()
 - 10.3.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendarBase.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendarBase::generateSettings()
 - 10.0.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendarBase.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendarBase::generateSettings()
 - 10.1.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendarBase.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendarBase::generateSettings()
 
Returns array of event settings for url options.
Parameters
\Drupal\node\NodeInterface $node: The node entity.
Return value
array Array of settings.
Overrides SocialAddToCalendarInterface::generateSettings
4 calls to SocialAddToCalendarBase::generateSettings()
- AddToGoogle::generateUrl in modules/
social_features/ social_event/ modules/ social_event_addtocal/ src/ Plugin/ SocialAddToCalendar/ AddToGoogle.php  - Returns the 'Add to calendar' link.
 - AddToICal::generateUrl in modules/
social_features/ social_event/ modules/ social_event_addtocal/ src/ Plugin/ SocialAddToCalendar/ AddToICal.php  - Returns the 'Add to calendar' link.
 - AddToOutlook::generateUrl in modules/
social_features/ social_event/ modules/ social_event_addtocal/ src/ Plugin/ SocialAddToCalendar/ AddToOutlook.php  - Returns the 'Add to calendar' link.
 - AddToYahoo::generateUrl in modules/
social_features/ social_event/ modules/ social_event_addtocal/ src/ Plugin/ SocialAddToCalendar/ AddToYahoo.php  - Returns the 'Add to calendar' link.
 
File
- modules/
social_features/ social_event/ modules/ social_event_addtocal/ src/ Plugin/ SocialAddToCalendarBase.php, line 35  
Class
- SocialAddToCalendarBase
 - Base class for Social add to calendar plugins.
 
Namespace
Drupal\social_event_addtocal\PluginCode
public function generateSettings(NodeInterface $node) {
  return [
    'title' => $node
      ->getTitle(),
    'dates' => $this
      ->getEventDates($node),
    'timezone' => date_default_timezone_get() !== DateTimeItemInterface::STORAGE_TIMEZONE ? date_default_timezone_get() : '',
    'description' => $this
      ->getEventDescription($node),
    'location' => $this
      ->getEventLocation($node),
    'nid' => $node
      ->id(),
  ];
}