You are here

function mailsystem_read_settings in Mail System 7.3

Returns a list of module delegations.

Return value

array An associative array ($id => $value) where:

  • $id is the machine-readable module name optionally followed by '_' and a key.
  • $value is an associative array whose keys are the names of methods defined by MailSystemInterface and whose values are the names of the class to use for that method.
2 calls to mailsystem_read_settings()
mailsystem_admin_settings in ./mailsystem.admin.inc
Form constructor for the mailsystem settings form.
mailsystem_requirements in ./mailsystem.install
Implements hook_requirements().

File

./mailsystem.module, line 90
Provide UI for controlling the mail_system variable.

Code

function mailsystem_read_settings() {
  $mail_system = mailsystem_get();
  $settings = array();
  foreach ($mail_system as $id => $class) {
    if ($class == 'MailsystemDelegateMailSystem') {
      $settings[$id] = variable_get('mailsystem_delegate:' . $id);
    }
    else {
      $settings[$id]['mail'] = $class;
      $settings[$id]['format'] = $class;
    }
  }
  return $settings;
}