public function DiffGeneratorInterface::build in Entity Share 8.3
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
\Drupal\Core\Field\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\entity_share_diff\Plugin\DiffGenerator\CoreFieldDiffParser
8 methods override DiffGeneratorInterface::build()
- CommentFieldDiffParser::build in modules/
entity_share_diff/ src/ Plugin/ DiffGenerator/ CommentFieldDiffParser.php - Builds an array of strings.
- CoreFieldDiffParser::build in modules/
entity_share_diff/ src/ Plugin/ DiffGenerator/ CoreFieldDiffParser.php - Builds an array of strings.
- EntityReferenceFieldDiffParser::build in modules/
entity_share_diff/ src/ Plugin/ DiffGenerator/ EntityReferenceFieldDiffParser.php - Builds an array of strings.
- FileFieldDiffParser::build in modules/
entity_share_diff/ src/ Plugin/ DiffGenerator/ FileFieldDiffParser.php - Builds an array of strings.
- LinkFieldDiffParser::build in modules/
entity_share_diff/ src/ Plugin/ DiffGenerator/ LinkFieldDiffParser.php - Builds an array of strings.
File
- modules/
entity_share_diff/ src/ DiffGenerator/ DiffGeneratorInterface.php, line 42
Class
- DiffGeneratorInterface
- Builds a diff from field item list.
Namespace
Drupal\entity_share_diff\DiffGeneratorCode
public function build(FieldItemListInterface $field_items);