You are here

interface FieldComparatorManagerInterface in Conflict 8.2

Hierarchy

Expanded class hierarchy of FieldComparatorManagerInterface

All classes that implement FieldComparatorManagerInterface

1 file declares its use of FieldComparatorManagerInterface
ContentEntityConflictHandler.php in src/Entity/ContentEntityConflictHandler.php

File

src/FieldComparatorManagerInterface.php, line 8

Namespace

Drupal\conflict
View source
interface FieldComparatorManagerInterface extends PluginManagerInterface {

  /**
   * Compares two field item lists.
   *
   * @param \Drupal\Core\Field\FieldItemListInterface $items_a
   *   The first field item list to compare.
   * @param \Drupal\Core\Field\FieldItemListInterface $items_a
   *   The second field item list to compare.
   * @param string $langcode
   *   The language code of the entity translation being checked.
   * @param string $entity_type_id
   *   The entity type ID.
   * @param string $bundle
   *   The entity bundle ID.
   * @param string $field_type
   *   The field type.
   * @param string $field_name
   *   The field name.
   *
   * @return bool
   *   TRUE, if the items have changed, FALSE otherwise.
   *
   * @throws \Exception
   *   An exception will be thrown if for some reason even the default field
   *   comparator has not been added to the field comparators list.
   */
  public function hasChanged(FieldItemListInterface $items_a, FieldItemListInterface $items_b, $langcode, $entity_type_id, $bundle, $field_type, $field_name);

  /**
   * Returns the conflict type for a field.
   *
   * @param \Drupal\Core\Field\FieldItemListInterface $local
   *   The local field item list to compare.
   * @param \Drupal\Core\Field\FieldItemListInterface $server
   *   The server field item list to compare.
   * @param \Drupal\Core\Field\FieldItemListInterface $original
   *   The original field item list, from which local and the server emerged.
   * @param string $langcode
   *   The language code of the entity translation being checked.
   * @param string $entity_type_id
   *   The entity type ID.
   * @param string $bundle
   *   The entity bundle ID.
   * @param string $field_type
   *   The field type.
   * @param string $field_name
   *   The field name.
   *
   * @return string|null
   *   The conflict type or NULL if none.
   *
   * @throws \Exception
   *   An exception will be thrown if for some reason even the default field
   *   comparator has not been added to the field comparators list.
   */
  public function getConflictType(FieldItemListInterface $local, FieldItemListInterface $server, FieldItemListInterface $original, $langcode, $entity_type_id, $bundle, $field_type, $field_name);

}

Members

Namesort descending Modifiers Type Description Overrides
DiscoveryInterface::getDefinition public function Gets a specific plugin definition. 4
DiscoveryInterface::getDefinitions public function Gets the definition of all plugins for this type. 3
DiscoveryInterface::hasDefinition public function Indicates if a specific plugin definition exists. 2
FactoryInterface::createInstance public function Creates a pre-configured instance of a plugin. 7
FieldComparatorManagerInterface::getConflictType public function Returns the conflict type for a field. 1
FieldComparatorManagerInterface::hasChanged public function Compares two field item lists. 1
MapperInterface::getInstance public function Gets a preconfigured instance of a plugin. 4