You are here

public function FeedImportHandler::startBatchImport in Feeds 8.3

Starts importing a feed via the batch API.

Parameters

\Drupal\feeds\FeedInterface $feed: The feed to import.

Throws

\Drupal\feeds\Exception\LockException Thrown if a feed is locked.

File

src/FeedImportHandler.php, line 37

Class

FeedImportHandler
Runs the actual import on a feed.

Namespace

Drupal\feeds

Code

public function startBatchImport(FeedInterface $feed) {
  $this
    ->getExecutable(FeedsBatchExecutable::class)
    ->processItem($feed, FeedsBatchExecutable::BEGIN);
}