You are here

public function FeedsHTTPFetcherAppendHeaders::configForm in Feeds HTTPFetcher Append Headers 7

Override parent::configForm().

File

plugins/FeedsHTTPFetcherAppendHeaders.inc, line 107
Home of the FeedsHTTPFetcherAppendHeaders and related classes.

Class

FeedsHTTPFetcherAppendHeaders
Fetches data via HTTP and appending custom headers.

Code

public function configForm(&$form_state) {
  $form = array();
  $form['append_headers'] = array(
    '#type' => 'textarea',
    '#title' => t('Append headers'),
    '#description' => t('Enter request headers that should be appended in the HTTP request. One header per line in the format key|value.'),
    '#default_value' => $this->config['append_headers'],
  );

  // Per importer override of global http request timeout setting.
  $form['request_timeout'] = array(
    '#type' => 'textfield',
    '#title' => t('Request timeout'),
    '#description' => t('Timeout in seconds to wait for an HTTP get request to finish.</br>' . '<b>Note:</b> this setting will override the global setting.</br>' . 'When left empty, the global value is used.'),
    '#default_value' => $this->config['request_timeout'],
    '#element_validate' => array(
      'element_validate_integer_positive',
    ),
    '#maxlength' => 3,
    '#size' => 30,
  );
  return $form;
}