You are here

public static function SerializedData::create in REST Views 2.0.x

Same name and namespace in other branches
  1. 8 src/SerializedData.php \Drupal\rest_views\SerializedData::create()

Create a serialized data object.

Parameters

mixed $data: The wrapped data.

Return value

static

11 calls to SerializedData::create()
BooleanExportFormatter::viewElements in src/Plugin/Field/FieldFormatter/BooleanExportFormatter.php
Builds a renderable array for a field value.
EntityFieldExport::renderItems in src/Plugin/views/field/EntityFieldExport.php
EntityReferenceExportFormatter::view in src/Plugin/Field/FieldFormatter/EntityReferenceExportFormatter.php
Builds a renderable array for a fully themed field.
EntityReferenceIdExportFormatter::viewElements in src/Plugin/Field/FieldFormatter/EntityReferenceIdExportFormatter.php
Builds a renderable array for a field value.
EntityReferencePathFormatter::viewElements in src/Plugin/Field/FieldFormatter/EntityReferencePathFormatter.php
Builds a renderable array for a field value.

... See full list

File

src/SerializedData.php, line 37

Class

SerializedData
Wrapper for passing serialized data through render arrays.

Namespace

Drupal\rest_views

Code

public static function create($data) {
  if ($data instanceof static) {
    return $data;
  }
  return new static($data);
}