Skip to content
Snippets Groups Projects
Commit 6f35b165 authored by Tobias Gross-Vogt's avatar Tobias Gross-Vogt
Browse files

added search filter parameter

parent cac4859e
No related branches found
No related tags found
No related merge requests found
Pipeline #184935 passed
......@@ -47,10 +47,11 @@ final class OrganizationCollectionDataProvider extends AbstractController implem
$options = ['lang' => $filters['lang'] ?? 'de'];
$options[LocalData::INCLUDE_PARAMETER_NAME] = LocalData::getIncludeParameter($filters);
Pagination::addPaginationOptions($options, $filters, self::MAX_ITEMS_PER_PAGE);
if ($search = ($filters['search'] ?? null)) {
$options['search'] = $search;
}
dump($filters);
dump($options);
Pagination::addPaginationOptions($options, $filters, self::MAX_ITEMS_PER_PAGE);
$personId = $filters['person'] ?? '';
if ($personId !== '') {
......
......@@ -18,7 +18,8 @@ use Dbp\Relay\CoreBundle\LocalData\LocalDataAwareTrait;
* "openapi_context" = {
* "tags" = {"BaseOrganization"},
* "parameters" = {
* {"name" = "person", "in" = "query", "description" = "Get organizations of a person (ID of BasePerson resource)", "required" = false, "type" = "string", "example" = "woody007"},
* {"name" = "search", "in" = "query", "description" = "Search for an organization", "type" = "string", "required" = false},
* {"name" = "person", "in" = "query", "description" = "Get organizations of a person (ID of BasePerson resource)", "type" = "string", "required" = false},
* {"name" = "lang", "in" = "query", "description" = "Language of result", "type" = "string", "enum" = {"de", "en"}, "example" = "de"},
* {"name" = "includeLocal", "in" = "query", "description" = "Local data attributes to include", "type" = "string", "example" = "BaseOrganization.code"},
* {"name" = "partialPagination", "in" = "query", "description" = "Enable partial pagination", "type" = "bool", "example" = "false"}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment