You are here

MailhandlerCommandsExtendedHeaders.class.php in Mailhandler 6.2

MailhandlerCommandsExtendedHeaders class.

File

modules/mailhandler_extended/plugins/mailhandler/commands/MailhandlerCommandsExtendedHeaders.class.php
View source
<?php

/**
 * @file
 * MailhandlerCommandsExtendedHeaders class.
 */
class MailhandlerCommandsExtendedHeaders extends MailhandlerCommandsHeaders {

  /**
   * Build configuration form.
   */
  public function configForm(&$form, &$form_state, $config) {
    $form['extended_headers'] = array(
      '#type' => 'textarea',
      '#title' => t('Extended headers'),
      '#description' => t('Additional headers that can be mapped to Feeds processor targets.'),
      '#default_value' => $config['extended_headers'],
    );
  }
  function getMappingSources($config) {
    $sources = array();
    $extended_headers = explode("\n", $config['extended_headers']);
    foreach ($extended_headers as $header) {
      $header = trim($header);
      $sources[$header] = array(
        'name' => $header,
        'description' => $header . ' (extended header)',
      );
    }
    return $sources;
  }

}

Classes

Namesort descending Description
MailhandlerCommandsExtendedHeaders @file MailhandlerCommandsExtendedHeaders class.