public function Yahoo::downloadSubmit in Add to Cal 8
@inheritdoc
Overrides AddToCalTypeInterface::downloadSubmit
File
- src/
Plugin/ AddToCal/ Type/ Yahoo.php, line 48
Class
- Yahoo
- Provides generic calendar type (ics).
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);
}