public function Google::downloadSubmit in Add to Cal 8
@inheritdoc
Overrides AddToCalTypeInterface::downloadSubmit
File
- src/
Plugin/ AddToCal/ Type/ Google.php, line 47
Class
- Provides google calendar type.
Namespace
Drupal\addtocal\Plugin\AddToCal\TypeCode
public function downloadSubmit(EntityInterface $entity, array $settings, $delta, FormStateInterface $form_state) {
$eventDetails = $this
->extractEventDetails($entity, $settings, $delta);
/** @var Url $url */
$url = $this
->generateStructure($eventDetails);
// External URLS require to be a trusted response
$response = new TrustedRedirectResponse($url
->toString());
$form_state
->setResponse($response);
}