You are here

function feed_import_feed_import_hash_manager_info in Feed Import 8

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

Implements hook_feed_import_hash_manager_info().

File

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

Code

function feed_import_feed_import_hash_manager_info() {
  $items = array(
    'sql' => array(
      'name' => t('SQL Hash Manager'),
      'description' => t('Monitored data is saved in database.'),
      'inherit_options' => FALSE,
      'class' => 'Drupal\\feed_import_base\\FeedImportSQLHashes',
      'options' => array(
        'group' => array(
          '#type' => 'textfield',
          '#title' => t('Group'),
          '#description' => t('Multiple feeds can update same entities if belong to same group.'),
          '#default_value' => '',
          '#required' => TRUE,
        ),
        'ttl' => array(
          '#type' => 'textfield',
          '#title' => t('Keep imported items (seconds)'),
          '#description' => t('This is used to delete items after expiration. Use 0 to keep items forever.'),
          '#default_value' => 0,
          '#element_validate' => array(
            'element_validate_integer',
          ),
          '#required' => TRUE,
        ),
        'update_chunk' => array(
          '#type' => 'textfield',
          '#title' => t('Minimum number of hashes to commit update'),
          '#default_value' => 300,
          '#element_validate' => array(
            'element_validate_integer_positive',
          ),
          '#required' => TRUE,
        ),
        'insert_chunk' => array(
          '#type' => 'textfield',
          '#title' => t('Minimum number of hashes to commit insert'),
          '#default_value' => 300,
          '#element_validate' => array(
            'element_validate_integer_positive',
          ),
          '#required' => TRUE,
        ),
      ),
    ),
  );
  $items['sqlv2compatible'] = array(
    'class' => 'Drupal\\feed_import_base\\FeedImportSQLHashesv2Compatible',
    'name' => t('SQL Hash Manager 2.x compatible'),
    'description' => t('Monitored data is saved in database.') . '<br>' . t('Do not use this for new feeds and do not change it if used!'),
    'inherit_options' => 'sql',
    'options' => array(
      'group' => array(
        '#description' => t('You cannot change the group, but you can use this group in other feeds.'),
        '#disabled' => TRUE,
      ),
    ),
  );
  return $items;
}