You are here

public function ImporterBase::process in CSV Importer 8

Run batch operations.

Overrides ImporterInterface::process

File

src/Plugin/ImporterBase.php, line 191

Class

ImporterBase
Provides a base class for ImporterBase plugins.

Namespace

Drupal\csv_importer\Plugin

Code

public function process() {
  if ($data = $this
    ->data()) {
    foreach ($data['content'] as $content) {
      $process['operations'][] = [
        [
          $this,
          'add',
        ],
        [
          $content,
        ],
      ];
    }
  }
  $process['finished'] = [
    $this,
    'finished',
  ];
  batch_set($process);
}