public function Google::generateStructure in Add to Cal 8
Generates a google calendar link
Parameters
array $info:
Return value
Overrides AddToCalTypeInterface::generateStructure
1 call to Google::generateStructure()
- Google::downloadSubmit in src/
Plugin/ AddToCal/ Type/ Google.php - @inheritdoc
File
- src/
Plugin/ AddToCal/ Type/ Google.php, line 28
Class
- Provides google calendar type.
Namespace
Drupal\addtocal\Plugin\AddToCal\TypeCode
public function generateStructure(array $info) {
$url = Url::fromUri('http://www.google.com/calendar/event', [
'query' => [
'action' => 'TEMPLATE',
'text' => $info['title'],
'dates' => $info['rfc3339']['both'],
'sprop' => 'website:' . $_SERVER['HTTP_HOST'],
'location' => $info['location'],
'details' => $info['description'],
],
]);
return $url;
}