Skip to content
Snippets Groups Projects
Commit da5b16e0 authored by Groß-Vogt, Tobias's avatar Groß-Vogt, Tobias
Browse files

removed deprecate parent constructor call of FileDataDataProvider; core update...

removed deprecate parent constructor call of FileDataDataProvider; core update and adaptions to modified AbstractDataProvider interface
parent 73cbd248
No related branches found
No related tags found
No related merge requests found
Pipeline #235523 failed
......@@ -7,7 +7,7 @@
"php": ">=7.3",
"ext-json": "*",
"api-platform/core": "^2.6",
"dbp/relay-core-bundle": "^0.1.56",
"dbp/relay-core-bundle": "^0.1.91",
"fgrosse/phpasn1": "^2.0",
"symfony/event-dispatcher": "^5.4",
"symfony/mailer": "^5.4",
......
This diff is collapsed.
......@@ -27,28 +27,22 @@ class FileDataDataProvider extends AbstractDataProvider
public function __construct(BlobService $blobService, RequestStack $requestStack)
{
parent::__construct($requestStack);
$this->blobService = $blobService;
$this->requestStack = $requestStack;
}
protected function onOperationStart(int $operation)
{
}
protected function getResourceClass(): string
{
return FileData::class;
}
/* getItemById() is overwritten with getFileDataById() because we want filters here for checking the signature */
public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?object
protected function isUserGrantedOperationAccess(int $operation): bool
{
$this->onOperationStart(self::GET_ITEM_OPERATION);
$filters = $context['filters'] ?? [];
return true;
}
protected function getItemById($id, array $filters = [], array $options = []): object
{
return $this->getFileDataById($id, $filters);
}
......@@ -88,11 +82,6 @@ class FileDataDataProvider extends AbstractDataProvider
return $fileData;
}
protected function getItemById($id, array $options = []): object
{
throw ApiError::withDetails(Response::HTTP_NOT_FOUND, 'Should not be called!', 'blob:wrong-function');
}
protected function getPage(int $currentPageNumber, int $maxNumItemsPerPage, array $filters = [], array $options = []): array
{
$sig = $this->requestStack->getCurrentRequest()->headers->get('x-dbp-signature', '');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment