You are here

public function FormatterInterface::prepare in RESTful 7.2

Massages the raw data to create a structured array to pass to the renderer.

Parameters

ResourceFieldInterface[] $data: The raw data to return.

Return value

array The data prepared to be rendered.

1 call to FormatterInterface::prepare()
Formatter::format in src/Plugin/formatter/Formatter.php
Formats the un-structured data into the output format.
3 methods override FormatterInterface::prepare()
FormatterHalJson::prepare in src/Plugin/formatter/FormatterHalJson.php
Massages the raw data to create a structured array to pass to the renderer.
FormatterJson::prepare in src/Plugin/formatter/FormatterJson.php
Massages the raw data to create a structured array to pass to the renderer.
FormatterJsonApi::prepare in src/Plugin/formatter/FormatterJsonApi.php
Massages the raw data to create a structured array to pass to the renderer.

File

src/Plugin/formatter/FormatterInterface.php, line 27
Contains \Drupal\restful\Plugin\formatter\FormatterInterface

Class

FormatterInterface

Namespace

Drupal\restful\Plugin\formatter

Code

public function prepare(array $data);