protected function JsonApiGenerator::filterParameters in OpenAPI for JSON:API 8.2
Same name and namespace in other branches
- 3.x src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php \Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator::filterParameters()
Filters an associative array by key on a set of parameter.
Parameters
array $parameters: Associative array that is going to be filtered.
Return value
array Returns the filtered associative array.
1 call to JsonApiGenerator::filterParameters()
- JsonApiGenerator::getMethodParameters in src/
Plugin/ openapi/ OpenApiGenerator/ JsonApiGenerator.php - Get the parameters array for a method on a route.
File
- src/
Plugin/ openapi/ OpenApiGenerator/ JsonApiGenerator.php, line 936
Class
- JsonApiGenerator
- Defines an OpenApi Schema Generator for the JsonApi module.
Namespace
Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGeneratorCode
protected function filterParameters(array $parameters) {
foreach (static::$PARAMETERS_FILTER_LIST as $filter) {
if (array_key_exists($filter, $parameters)) {
unset($parameters[$filter]);
}
}
return $parameters;
}