public function onAfterValidate(ImportItemEvent $event) { if (!$event->getCurrentResult()) { ++$this->statistics['invalid']; $this->import->getRun()->setStatistics($this->statistics); } }
/** * @return ImportItemEvent */ public function newItemEvent($item) { $event = new ImportItemEvent($item); $event->setContext($this->context); return $event; }
protected function processConvertFilter(array $item, ImportItemEvent $event) { $filterResult = $this->filterItem($item, $this->afterConversionFilters); $this->eventDispatcher->dispatch(ImportItemEvent::AFTER_CONVERSIONFILTER, $event->setCurrentResult($filterResult)); return $filterResult; }