public function AddToYahoo::generateUrl 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/SocialAddToCalendar/AddToYahoo.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendar\AddToYahoo::generateUrl()
- 10.3.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToYahoo.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendar\AddToYahoo::generateUrl()
- 10.0.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToYahoo.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendar\AddToYahoo::generateUrl()
- 10.1.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToYahoo.php \Drupal\social_event_addtocal\Plugin\SocialAddToCalendar\AddToYahoo::generateUrl()
Returns the 'Add to calendar' link.
Parameters
\Drupal\node\NodeInterface $node: The node entity.
Return value
\Drupal\Core\Url Url object.
Overrides SocialAddToCalendarBase::generateUrl
File
- modules/
social_features/ social_event/ modules/ social_event_addtocal/ src/ Plugin/ SocialAddToCalendar/ AddToYahoo.php, line 23
Class
- AddToYahoo
- Provides add to Yahoo calendar plugin.
Namespace
Drupal\social_event_addtocal\Plugin\SocialAddToCalendarCode
public function generateUrl(NodeInterface $node) {
$settings = $this
->generateSettings($node);
$options = [
'query' => [
'v' => 60,
'TITLE' => $settings['title'],
'ST' => $settings['dates']['start'],
'ET' => $settings['dates']['end'],
'desc' => $settings['description'],
'in_loc' => $settings['location'],
],
'attributes' => [
'target' => '_blank',
],
];
return Url::fromUri($this->pluginDefinition['url'], $options);
}