AddToYahoo.php in Open Social 8.9
Same filename and directory in other branches
- 10.3.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToYahoo.php
- 10.0.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToYahoo.php
- 10.1.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToYahoo.php
- 10.2.x modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToYahoo.php
File
modules/social_features/social_event/modules/social_event_addtocal/src/Plugin/SocialAddToCalendar/AddToYahoo.phpView source
<?php
namespace Drupal\social_event_addtocal\Plugin\SocialAddToCalendar;
use Drupal\Core\Url;
use Drupal\node\NodeInterface;
use Drupal\social_event_addtocal\Plugin\SocialAddToCalendarBase;
/**
* Provides add to Google calendar plugin.
*
* @SocialAddToCalendar(
* id = "yahoo",
* label = @Translation("Yahoo"),
* url = "http://calendar.yahoo.com"
* )
*/
class AddToYahoo extends SocialAddToCalendarBase {
/**
* {@inheritdoc}
*/
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);
}
}
Classes
Name | Description |
---|---|
AddToYahoo | Provides add to Google calendar plugin. |