replaceAvailableImportHandlers(); $itemModelClass = $this->getClass(taoItems_models_classes_itemModel::CLASS_URI_MODELS); foreach ($itemModelClass->getInstances() as $model) { $impl = taoItems_models_classes_ItemsService::singleton()->getItemModelImplementation($model); if (in_array('tao_models_classes_import_ImportProvider', class_implements($impl))) { foreach ($impl->getImportHandlers() as $handler) { array_unshift($returnValue, $handler); } } } return $returnValue; } private function replaceAvailableImportHandlers(): array { $returnValue = parent::getAvailableImportHandlers(); foreach (array_keys($returnValue) as $key) { if ($returnValue[$key] instanceof \tao_models_classes_import_CsvImporter) { if ($this->getFeatureFlagChecker()->isEnabled(FeatureFlagCheckerInterface::FEATURE_FLAG_TABULAR_IMPORT)) { $importer = new CsvItemImporter($this->getPsrRequest()); $importer->setServiceLocator($this->getServiceLocator()); $returnValue[$key] = $importer; continue; } unset($returnValue[$key]); } } return $returnValue; } private function getFeatureFlagChecker(): FeatureFlagCheckerInterface { return $this->getServiceLocator()->get(FeatureFlagChecker::class); } }