You are here

function campaignmonitor_delete_list in Campaign Monitor 8

1 call to campaignmonitor_delete_list()
CampaignMonitorListDeleteForm::submitForm in src/Form/CampaignMonitorListDeleteForm.php
Form submission handler.

File

./campaignmonitor.module, line 253
Module that plugs in Campaign Monitor functionality to your Drupal web site. For Campaign Monitor information see: http://www.campaignmonitor.com/.

Code

function campaignmonitor_delete_list($list_id) {
  $cm = CampaignMonitor::getConnector();

  // Delete the list at Campaign Monitor.
  if ($cm
    ->deleteList($list_id)) {
    drupal_set_message(t('The list has been deleted.'), 'status');
  }
  else {
    drupal_set_message(t('The list could not be deleted.'), 'error');
  }
}