You are here

public function FieldDiffBuilderInterface::build in Diff 8

Builds an array of strings.

This method is responsible for transforming a FieldItemListInterface object into an array of strings. The resulted array of strings is then compared by the Diff component with another such array of strings and the result represents the difference between two entity fields.

Example of FieldItemListInterface built into an array of strings:

array(
  0 => "This is an example string",
  1 => "Field values or properties",
);

Parameters

FieldItemListInterface $field_items: Represents an entity field.

Return value

mixed An array of strings to be compared. If an empty array is returned it means that a field is either empty or no properties need to be compared for that field.

See also

\Drupal\diff\Plugin\diff\Field\TextFieldBuilder

11 methods override FieldDiffBuilderInterface::build()
CommentFieldBuilder::build in src/Plugin/diff/Field/CommentFieldBuilder.php
Builds an array of strings.
CoreFieldBuilder::build in src/Plugin/diff/Field/CoreFieldBuilder.php
Builds an array of strings.
EntityReferenceFieldBuilder::build in src/Plugin/diff/Field/EntityReferenceFieldBuilder.php
Builds an array of strings.
FileFieldBuilder::build in src/Plugin/diff/Field/FileFieldBuilder.php
Builds an array of strings.
ImageFieldBuilder::build in src/Plugin/diff/Field/ImageFieldBuilder.php
Builds an array of strings.

... See full list

File

src/FieldDiffBuilderInterface.php, line 41

Class

FieldDiffBuilderInterface
Builds a diff from field item list.

Namespace

Drupal\diff

Code

public function build(FieldItemListInterface $field_items);