You are here

public function FeedsDataProcessor::configForm in Feeds 6

Override parent::configForm().

Overrides FeedsConfigurable::configForm

File

plugins/FeedsDataProcessor.inc, line 246
Definition of FeedsDataProcessor.

Class

FeedsDataProcessor
Creates simple table records from feed items. Uses Data module.

Code

public function configForm(&$form_state) {
  $period = drupal_map_assoc(array(
    FEEDS_EXPIRE_NEVER,
    3600,
    10800,
    21600,
    43200,
    86400,
    259200,
    604800,
    604800 * 4,
    604800 * 12,
    604800 * 24,
    31536000,
  ), 'feeds_format_expire');
  $form['expire'] = array(
    '#type' => 'select',
    '#title' => t('Expire items'),
    '#options' => $period,
    '#description' => t('Select after how much time data records should be deleted. The timestamp target value will be used for determining the item\'s age, see Mapping settings.'),
    '#default_value' => $this->config['expire'],
  );
  $form['update_existing'] = array(
    '#type' => 'checkbox',
    '#title' => t('Replace existing records'),
    '#description' => t('If an existing record is found for an imported record, replace it. Existing records will be determined using mappings that are a "unique target".'),
    '#default_value' => $this->config['update_existing'],
  );
  $form['delete_with_source'] = array(
    '#type' => 'checkbox',
    '#title' => t('Delete items with source'),
    '#description' => t('If enabled, any feed items associated with a source node will be removed along with the node. Not available for standalone importers.'),
    '#default_value' => $this->config['delete_with_source'],
    '#disabled' => empty(feeds_importer($this->id)->config['content_type']) ? TRUE : FALSE,
  );
  return $form;
}