/** * @param array $rowData * @return array */ protected function processRowCategories($rowData) { $categoriesString = empty($rowData[self::COL_CATEGORY]) ? '' : $rowData[self::COL_CATEGORY]; $categoryIds = []; if (!empty($categoriesString)) { $categoryIds = $this->categoryProcessor->upsertCategories($categoriesString, $this->getMultipleValueSeparator()); foreach ($this->categoryProcessor->getFailedCategories() as $error) { $this->errorAggregator->addError(AbstractEntity::ERROR_CODE_CATEGORY_NOT_VALID, ProcessingError::ERROR_LEVEL_NOT_CRITICAL, $rowData['rowNum'], self::COL_CATEGORY, __('Category "%1" has not been created.', $error['category']) . ' ' . $error['exception']->getMessage()); } } return $categoryIds; }