You are here

function feed_import_feed_import_processor_info in Feed Import 8

Same name and namespace in other branches
  1. 7.3 feed_import.module \feed_import_feed_import_processor_info()

Implements hook_feed_import_processor_info().

File

./feed_import.module, line 389
User interface, cron functions for feed_import module.

Code

function feed_import_feed_import_processor_info() {
  return array(
    'default' => array(
      'name' => t('Feed Import Processor'),
      'description' => t('Processor provided by Feed Import module'),
      'class' => 'Drupal\\feed_import_base\\FeedImportProcessor',
      'inherit_options' => FALSE,
      'options' => array(
        'items_count' => array(
          '#type' => 'textfield',
          '#title' => 'After how many created entities to save them',
          '#description' => t('Use 0 for creating all entities first.'),
          '#default_value' => 300,
          '#required' => TRUE,
          '#element_validate' => array(
            'element_validate_integer',
          ),
        ),
        'skip_imported' => array(
          '#type' => 'checkbox',
          '#title' => t('Skip already imported items'),
          '#default_value' => FALSE,
          '#description' => t('This is possible only when items are monitored.'),
        ),
        'updates_only' => array(
          '#type' => 'checkbox',
          '#title' => t('Only update already imported items'),
          '#default_value' => FALSE,
          '#description' => t('Using this option no new entity will be created.') . ' ' . t('This is possible only when items are monitored.'),
          '#element_validate' => array(
            'feed_import_element_validate_updates_only',
          ),
        ),
        'reset_cache' => array(
          '#type' => 'textfield',
          '#title' => t('Reset entity static cache'),
          '#description' => t('After how many cached entities to reset the in-memory cache.') . ' ' . t('This can reduce memory usage. Use 0 to ignore it.'),
          '#default_value' => 100,
          '#element_validate' => array(
            'element_validate_integer',
          ),
          '#required' => TRUE,
        ),
        'throw_exception' => array(
          '#type' => 'checkbox',
          '#title' => t('Throw exception on error'),
          '#default_value' => TRUE,
          '#description' => t('Will break import on errors.') . ' ' . t('Also, this is useful for developers.'),
        ),
        'max_reported_errors' => array(
          '#type' => 'textfield',
          '#title' => t('Maximum number of errors to log'),
          '#default_value' => 100,
          '#element_validate' => array(
            'element_validate_integer_positive',
          ),
          '#required' => TRUE,
        ),
        'break_on_undefined_filter' => array(
          '#type' => 'checkbox',
          '#title' => t('Stop import if a filter function is not declared'),
          '#default_value' => TRUE,
        ),
        'skip_defined_functions_check' => array(
          '#type' => 'checkbox',
          '#title' => t('Skip creating already declared dynamic functions'),
          '#description' => t('This is usefull if you try to import multiple feeds that declare same dynamic function names.') . ' ' . t('However, it is recommended to put those functions in a php filter file rather than creating them dynamically.'),
          '#default_value' => FALSE,
        ),
        'uniq_callback' => array(
          '#type' => 'textfield',
          '#title' => t('Unique id alter callback'),
          '#description' => t('Function to call before the hash is computed using unique id value.'),
          '#default_value' => '',
        ),
        'after_save' => array(
          '#type' => 'textfield',
          '#title' => t('Entity after save/update callback'),
          '#description' => t('Function to call after entity was saved or updated.'),
          '#default_value' => '',
        ),
        'before_combine' => array(
          '#type' => 'textfield',
          '#title' => t('Entity before combine callback'),
          '#description' => t('Return of this function decides if new and current entity versions will be combined, skipped or rescheduled.'),
          '#default_value' => '',
        ),
        'after_combine' => array(
          '#type' => 'textfield',
          '#title' => t('Entity after combine callback'),
          '#description' => t('Return of this function decides if the new entity will be updated, skipped or rescheduled.'),
          '#default_value' => '',
        ),
        'before_create' => array(
          '#type' => 'textfield',
          '#title' => t('Entity before create callback'),
          '#description' => t('Return of this function decides if will skip the entity import, create or save.'),
          '#default_value' => '',
        ),
        'before_save' => array(
          '#type' => 'textfield',
          '#title' => t('Entity before save callback'),
          '#description' => t('Return of this function decides if will skip entity import or save.'),
          '#default_value' => '',
        ),
      ),
    ),
  );
}