You are here

public static function FeedImport::getEmptyFeed in Feed Import 8

Gets a new empty feed configuration.

Return value

array An empty feed configuration.

2 calls to FeedImport::getEmptyFeed()
FeedImporterAddForm::submitForm in src/Form/FeedImporterAddForm.old.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
ImportForm::importFromJson in src/Form/ImportForm.php
Import a feed from a json file.

File

feed_import_base/src/FeedImport.php, line 278

Class

FeedImport
This class provides helper functions for feed import.

Namespace

Drupal\feed_import_base

Code

public static function getEmptyFeed() {
  return array(
    'name' => NULL,
    'machine_name' => NULL,
    'entity' => NULL,
    'cron_import' => 0,
    'last_run' => 0,
    'last_run_duration' => 0,
    'last_run_items' => 0,
    'settings' => array(
      'uniq_path' => NULL,
      'preprocess' => NULL,
      'feed' => array(
        'protect_on_invalid_source' => FALSE,
        'protect_on_fewer_items' => 0,
      ),
      'processor' => array(
        'name' => 'default',
        'class' => 'Drupal\\feed_import_base\\FeedImportProcessor',
        'options' => array(
          'items_count' => 0,
          'skip_imported' => FALSE,
          'reset_cache' => 100,
          'break_on_undefined_filter' => TRUE,
          'skip_defined_functions_check' => FALSE,
          'updates_only' => FALSE,
        ),
      ),
      'reader' => array(
        'name' => 'xml',
        'class' => 'Drupal\\feed_import_base\\SimpleXMLFIReader',
        'options' => array(),
      ),
      'hashes' => array(
        'name' => 'sql',
        'class' => 'Drupal\\feed_import_base\\FeedImportSQLHashes',
        'options' => array(
          'ttl' => 0,
          'insert_chunk' => 300,
          'update_chunk' => 300,
          'group' => '',
        ),
      ),
      'filter' => array(
        'name' => 'default',
        'class' => 'Drupal\\feed_import_base\\FeedImportMultiFilter',
        'options' => array(
          'param' => '[field]',
          'include' => NULL,
        ),
      ),
      'fields' => array(),
      'static_fields' => array(),
      'functions' => array(),
    ),
  );
}