protected function Controller::extractFormatNames in Schemata 8
Helper function that inspects the request to extract the formats.
Extracts the format of the response and media type being described.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The request object.
Return value
array An array containing the format of the output and the media type being described.
1 call to Controller::extractFormatNames()
- Controller::serialize in src/
Controller/ Controller.php  - Serializes a entity type or bundle definition.
 
File
- src/
Controller/ Controller.php, line 117  
Class
- Controller
 - Contains callback methods for dynamic routes.
 
Namespace
Drupal\schemata\ControllerCode
protected function extractFormatNames(Request $request) {
  return [
    $request
      ->getRequestFormat(),
    $request->query
      ->get('_describes', ''),
  ];
}