Skip to content

Instantly share code, notes, and snippets.

@tristanlins
Last active July 18, 2018 02:33
Show Gist options
  • Save tristanlins/6204396 to your computer and use it in GitHub Desktop.
Save tristanlins/6204396 to your computer and use it in GitHub Desktop.
[Avisota 2 Example] subscribe to events
<?php
$GLOBALS['TL_EVENTS']['avisota-recipient-subscribe'][] = function(
\Avisota\Contao\Event\SubscribeEvent $event
) {
/** @var \Avisota\Contao\Entity\Recipient $recipient */
$recipient = $event->getRecipient();
/** @var \Avisota\Contao\Entity\RecipientSubscription $subscription */
$subscription = $event->getSubscription();
// do whatever you want
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment