You are here

interface StateInformationInterface in Entity Share 8.2

Same name and namespace in other branches
  1. 8.3 modules/entity_share_client/src/Service/StateInformationInterface.php \Drupal\entity_share_client\Service\StateInformationInterface

Remote manager interface methods.

Hierarchy

Expanded class hierarchy of StateInformationInterface

All classes that implement StateInformationInterface

1 file declares its use of StateInformationInterface
MultilingualTest.php in modules/entity_share_client/tests/src/Functional/MultilingualTest.php

File

modules/entity_share_client/src/Service/StateInformationInterface.php, line 10

Namespace

Drupal\entity_share_client\Service
View source
interface StateInformationInterface {

  /**
   * The info id in the case of an undefined state.
   */
  const INFO_ID_UNDEFINED = 'undefined';

  /**
   * The info id in the case of an unknown entity type.
   */
  const INFO_ID_UNKNOWN = 'unknown';

  /**
   * The info id in the case of a new entity.
   */
  const INFO_ID_NEW = 'new';

  /**
   * The info id in the case of a new entity translation.
   */
  const INFO_ID_NEW_TRANSLATION = 'new_translation';

  /**
   * The info id in the case of a changed entity or translation.
   */
  const INFO_ID_CHANGED = 'changed';

  /**
   * The info id in the case of a synchronized entity or translation.
   */
  const INFO_ID_SYNCHRONIZED = 'synchronized';

  /**
   * Check if an entity already exists or not and get status info.
   *
   * Default implementation is to compare revision timestamp.
   *
   * @param array $data
   *   The data of a single entity from the JSON:API payload.
   *
   * @return array
   *   Returns an array of info:
   *     - label: the label to display.
   *     - class: to add a class on a row.
   *     - info_id: an identifier of the status info.
   *     - local_entity_link: the link of the local entity if it exists.
   *     - local_revision_id: the revision ID of the local entity if it exists.
   */
  public function getStatusInfo(array $data);

}

Members

Namesort descending Modifiers Type Description Overrides
StateInformationInterface::getStatusInfo public function Check if an entity already exists or not and get status info. 1
StateInformationInterface::INFO_ID_CHANGED constant The info id in the case of a changed entity or translation.
StateInformationInterface::INFO_ID_NEW constant The info id in the case of a new entity.
StateInformationInterface::INFO_ID_NEW_TRANSLATION constant The info id in the case of a new entity translation.
StateInformationInterface::INFO_ID_SYNCHRONIZED constant The info id in the case of a synchronized entity or translation.
StateInformationInterface::INFO_ID_UNDEFINED constant The info id in the case of an undefined state.
StateInformationInterface::INFO_ID_UNKNOWN constant The info id in the case of an unknown entity type.