/**
  * @param Subscription $subscription
  *
  * @return string
  * @SuppressWarnings(PHPMD.CamelCaseVariableName)
  */
 protected function generateSubscriptionActivationLink(Subscription $subscription)
 {
     if ($subscription->getActive()) {
         return '';
     }
     global $TL_LANG, $container;
     $eventDispatcher = $container['event-dispatcher'];
     $title = $TL_LANG['orm_avisota_recipient']['confirm_subscription'];
     $event = new GenerateHtmlEvent('ok.gif', $title, sprintf('title="%s"', specialchars($title)));
     $eventDispatcher->dispatch(ContaoEvents::IMAGE_GET_HTML, $event);
     $icon = $event->getHtml();
     return sprintf('<a href="contao/main.php?do=avisota_recipients' . '&act=confirm-subscription&subscription=%s&ref=%s">%s</a>', $subscription->getId(), defined('TL_REFERER_ID') ? TL_REFERER_ID : '', $icon);
 }