/** * Invokes the parse stage. * * @param \Drupal\feeds\FeedInterface $feed * The feed to fetch. * @param \Drupal\feeds\Result\FetcherResultInterface $fetcher_result * The result of the fetcher. * * @return \Drupal\feeds\Result\ParserResultInterface * The result of the parser. */ protected function doParse(FeedInterface $feed, FetcherResultInterface $fetcher_result) { $this->dispatchEvent(FeedsEvents::INIT_IMPORT, new InitEvent($feed, 'parse')); $parse_event = $this->dispatchEvent(FeedsEvents::PARSE, new ParseEvent($feed, $fetcher_result)); $feed->setState(StateInterface::PROCESS, NULL); return $parse_event->getParserResult(); }