You are here

interface TrackingHelperInterface in Search API 8

Provides an interface for the tracking helper service.

Hierarchy

Expanded class hierarchy of TrackingHelperInterface

All classes that implement TrackingHelperInterface

File

src/Utility/TrackingHelperInterface.php, line 12

Namespace

Drupal\search_api\Utility
View source
interface TrackingHelperInterface {

  /**
   * Reacts to an entity being updated or deleted.
   *
   * Determines whether this entity is indirectly referenced in any search index
   * and, if so, marks all items referencing it as updated.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity that just got changed (updated or deleted).
   * @param bool $deleted
   *   (optional) TRUE if the entity was deleted, FALSE if it was updated.
   *
   * @see \Drupal\search_api\Datasource\DatasourceInterface::getAffectedItemsForEntityChange()
   */
  public function trackReferencedEntityUpdate(EntityInterface $entity, bool $deleted = FALSE);

}

Members

Namesort descending Modifiers Type Description Overrides
TrackingHelperInterface::trackReferencedEntityUpdate public function Reacts to an entity being updated or deleted. 1