You are here

function campaignmonitor_get_list_options in Campaign Monitor 8

Helper function to return lists as an option array for form fields.

Return value

array

2 calls to campaignmonitor_get_list_options()
CampaignMonitorNodeSettingsForm::buildForm in modules/campaignmonitor_campaign/src/Form/CampaignMonitorNodeSettingsForm.php
Form constructor.
Lists::preRender in modules/campaignmonitor_local/src/Plugin/views/Field/Lists.php
Runs before any fields are rendered.

File

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

Code

function campaignmonitor_get_list_options() {
  $lists = campaignmonitor_get_lists();
  $options = [];
  foreach ($lists as $list_id => $list) {
    $options[$list_id] = $list['name'];
  }
  return $options;
}