You are here

public function FormatterManagerInterface::negotiateFormatter in RESTful 7.2

Helper function to get the default output format from the current request.

Parameters

string $accept: The Accept header.

string $formatter_name: The name of the formatter for the current resource.

Return value

FormatterInterface The formatter plugin to use.

1 method overrides FormatterManagerInterface::negotiateFormatter()
FormatterManager::negotiateFormatter in src/Formatter/FormatterManager.php
Helper function to get the default output format from the current request.

File

src/Formatter/FormatterManagerInterface.php, line 62
Contains \Drupal\restful\Formatter\FormatterManagerInterface

Class

FormatterManagerInterface

Namespace

Drupal\restful\Formatter

Code

public function negotiateFormatter($accept, $formatter_name = NULL);