interface FieldDiffBuilderInterface in Diff 8
Builds a diff from field item list.
Hierarchy
- interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\Component\Plugin\ConfigurableInterface
- interface \Drupal\diff\FieldDiffBuilderInterface
Expanded class hierarchy of FieldDiffBuilderInterface
All classes that implement FieldDiffBuilderInterface
File
- src/
FieldDiffBuilderInterface.php, line 13
Namespace
Drupal\diffView source
interface FieldDiffBuilderInterface extends PluginFormInterface, ConfigurableInterface {
/**
* 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:
* @code
* array(
* 0 => "This is an example string",
* 1 => "Field values or properties",
* )
* @endcode
*
* @see \Drupal\diff\Plugin\diff\Field\TextFieldBuilder
*
* @param FieldItemListInterface $field_items
* Represents an entity field.
*
* @return 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.
*/
public function build(FieldItemListInterface $field_items);
/**
* Returns if the plugin can be used for the provided field.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $field_definition
* The field definition that should be checked.
*
* @return bool
* TRUE if the plugin can be used, FALSE otherwise.
*/
public static function isApplicable(FieldStorageDefinitionInterface $field_definition);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
FieldDiffBuilderInterface:: |
public | function | Builds an array of strings. | 11 |
FieldDiffBuilderInterface:: |
public static | function | Returns if the plugin can be used for the provided field. | 1 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |