You are here

public function FeedImportHandler::pushImport in Feeds 8.3

Handles a push import.

Parameters

\Drupal\feeds\FeedInterface $feed: The feed receiving the push.

string $payload: The feed contents.

\Drupal\Core\File\FileSystemInterface $file_system: (optional) The file system service.

File

src/FeedImportHandler.php, line 75

Class

FeedImportHandler
Runs the actual import on a feed.

Namespace

Drupal\feeds

Code

public function pushImport(FeedInterface $feed, $payload, FileSystemInterface $file_system = NULL) {
  $feed
    ->lock();
  $fetcher_result = new RawFetcherResult($payload, $file_system);
  $this
    ->getExecutable(FeedsQueueExecutable::class)
    ->processItem($feed, FeedsQueueExecutable::PARSE, [
    'fetcher_result' => $fetcher_result,
  ]);
}