public function FormatterManager::format in RESTful 7.2
Call the output format on the given data.
Parameters
array $data: The array of data to format.
string $formatter_name: The name of the formatter for the current resource. Leave it NULL to use the Accept headers.
Return value
string The formatted output.
Overrides FormatterManagerInterface::format
File
- src/
Formatter/ FormatterManager.php, line 70 - Contains \Drupal\restful\Formatter\FormatterManager
Class
- FormatterManager
- Class FormatterManager.
Namespace
Drupal\restful\FormatterCode
public function format(array $data, $formatter_name = NULL) {
return $this
->processData('format', $data, $formatter_name);
}