You are here

interface ContentHasherInterface in Tome 8

Interface for classes that can hash normalized content.

Hierarchy

Expanded class hierarchy of ContentHasherInterface

All classes that implement ContentHasherInterface

3 files declare their use of ContentHasherInterface
ContentHasherEventSubscriber.php in modules/tome_sync/src/EventSubscriber/ContentHasherEventSubscriber.php
ImportPartialCommand.php in modules/tome_sync/src/Commands/ImportPartialCommand.php
ImportPartialForm.php in modules/tome_sync/src/Form/ImportPartialForm.php

File

modules/tome_sync/src/ContentHasherInterface.php, line 8

Namespace

Drupal\tome_sync
View source
interface ContentHasherInterface {

  /**
   * Writes a content hash.
   *
   * @param string $encoded_content
   *   The encoded content, typically JSON.
   * @param string $content_name
   *   The content name.
   */
  public function writeHash($encoded_content, $content_name);

  /**
   * Deletes a content hash.
   *
   * @param string $content_name
   *   The content name.
   */
  public function deleteHash($content_name);

  /**
   * Get a list of changed content.
   *
   * @return array
   *   An array of arrays of content names, keyed by the kind of change:
   *   - deleted
   *   - added
   *   - modified
   */
  public function getChangelist();

  /**
   * Validates that hashes exist.
   *
   * @return bool
   *   Whether or not any hashes exist.
   */
  public function hashesExist();

}

Members

Namesort descending Modifiers Type Description Overrides
ContentHasherInterface::deleteHash public function Deletes a content hash. 1
ContentHasherInterface::getChangelist public function Get a list of changed content. 1
ContentHasherInterface::hashesExist public function Validates that hashes exist. 1
ContentHasherInterface::writeHash public function Writes a content hash. 1