// Send email with summary of any allocations made.
if(count($events_created)==0){
$message=t("No nodes with sufficient capacity were found, therefore no reservations were created.\nTo view the submission, please go to @submission",['@submission'=>$webform_submission->url('canonical',['absolute'=>TRUE])]);
$message=t("The following BEE reservations were created for a new webform submission:\n\n@event_links\n\nTo view the submission, please go to @submission",['@event_links'=>implode("\n",$event_links),'@submission'=>$webform_submission->url('canonical',['absolute'=>TRUE])]);
$message=t('An email notification has been sent to @email for creating a webform BEE reservation.',array('@email'=>$to));
drupal_set_message($message);
\Drupal::logger('bee_webform')->notice($message);
// Send email with summary of any allocations made.
if(count($events_created)==0){
$message=t("No nodes with sufficient capacity were found, therefore no reservations were created.\nTo view the submission, please go to @submission",['@submission'=>$webform_submission->url('canonical',['absolute'=>TRUE])]);
$message=t("The following BEE reservations were created for a new webform submission:\n\n@event_links\n\nTo view the submission, please go to @submission",['@event_links'=>implode("\n",$event_links),'@submission'=>$webform_submission->url('canonical',['absolute'=>TRUE])]);