[TASK] Updates for TYPO3 11
This commit is contained in:
@@ -80,10 +80,10 @@ trait DependencyInjectionTrait
|
||||
$this->objectManager = GeneralUtility::makeInstance(
|
||||
ObjectManager::class
|
||||
);
|
||||
$this->configurationManager = $this->objectManager->get(
|
||||
$this->configurationManager = GeneralUtility::makeInstance(
|
||||
ConfigurationManagerInterface::class
|
||||
);
|
||||
$this->apiUtility = $this->objectManager->get(
|
||||
$this->apiUtility = GeneralUtility::makeInstance(
|
||||
ApiUtility::class
|
||||
);
|
||||
$frameworkConfiguration = $this->configurationManager->getConfiguration(
|
||||
@@ -102,11 +102,7 @@ trait DependencyInjectionTrait
|
||||
$frameworkConfiguration['persistence']['storagePid']
|
||||
)
|
||||
);
|
||||
$this->reflectionService = GeneralUtility::makeInstance(
|
||||
ReflectionService::class, GeneralUtility::makeInstance(
|
||||
CacheManager::class
|
||||
)
|
||||
);
|
||||
$this->reflectionService = GeneralUtility::makeInstance(ReflectionService::class);
|
||||
$classInfo = $this->reflectionService->getClassSchema(
|
||||
get_class($this)
|
||||
);
|
||||
|
||||
@@ -127,22 +127,12 @@ trait ValidationTrait
|
||||
if (is_array($input) && array_key_exists('eID', $input)) {
|
||||
unset($input['eID']);
|
||||
}
|
||||
//@TODO make optional when usiing rest api
|
||||
//array_walk_recursive(
|
||||
// $input,
|
||||
// function (&$value) {
|
||||
// if (filter_var($value, FILTER_VALIDATE_INT)) {
|
||||
// $value = (int)$value;
|
||||
// }
|
||||
// }
|
||||
//);
|
||||
$input = ArrayUtility::toObject($input);
|
||||
$validationResult = $validator->dataValidation(
|
||||
$input,
|
||||
json_encode($schema),
|
||||
-1
|
||||
);
|
||||
|
||||
if (!$validationResult->isValid()) {
|
||||
$this->isValid = false;
|
||||
$this->responseStatus = [400 => 'validationError'];
|
||||
|
||||
Reference in New Issue
Block a user