function campaignmonitor_set_list_settings in Campaign Monitor 8
Helper function to set local config for a list.
Parameters
$list_id:
$list_options:
3 calls to campaignmonitor_set_list_settings()
- CampaignMonitorListsController::listToggleEnable in src/
Controller/ CampaignMonitorListsController.php - CampaignMonitorListSettingsForm::submitForm in src/
Form/ CampaignMonitorListSettingsForm.php - Form submission handler.
- campaignmonitor_registration_form_campaignmonitor_list_settings_submit in modules/
campaignmonitor_registration/ campaignmonitor_registration.module - Submit handler for list settings form
File
- ./
campaignmonitor.module, line 186 - Module that plugs in Campaign Monitor functionality to your Drupal web site. For Campaign Monitor information see: http://www.campaignmonitor.com/.
Code
function campaignmonitor_set_list_settings($list_id, $list_options) {
$config = \Drupal::getContainer()
->get('config.factory')
->getEditable('campaignmonitor.settings.list');
$list_key = campaignmonitor_list_key($list_id);
$config
->set($list_key, $list_options)
->save();
}