You are here

protected function JsonapiParse::resolveData in JSON:API Include 8

Resolve data.

Parameters

array|mixed $data: The data for resolve.

Return value

array Result.

1 call to JsonapiParse::resolveData()
JsonapiParse::resolveRelationshipData in src/JsonapiParse.php
Resolve data.

File

src/JsonapiParse.php, line 135

Class

JsonapiParse
Class JsonapiParse.

Namespace

Drupal\jsonapi_include

Code

protected function resolveData($data) {
  if ($this
    ->isIncluded($data)) {
    return $this
      ->flattenIncluded($data);
  }
  else {
    return $data;
  }
}