You are here

interface ImporterInterface in Tome 8

Provides an interface for the importer.

Hierarchy

Expanded class hierarchy of ImporterInterface

All classes that implement ImporterInterface

4 files declare their use of ImporterInterface
DeleteContentCommand.php in modules/tome_sync/src/Commands/DeleteContentCommand.php
ImportCommand.php in modules/tome_sync/src/Commands/ImportCommand.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/ImporterInterface.php, line 8

Namespace

Drupal\tome_sync
View source
interface ImporterInterface {

  /**
   * The key user interfaces should use to see if they're running an import.
   */
  const STATE_KEY_IMPORTING = 'tome_sync.importing';

  /**
   * Imports a content entity from the source storage.
   *
   * @param string $entity_type_id
   *   The entity type ID.
   * @param string $uuid
   *   The entity UUID.
   * @param string $langcode
   *   (optional) The langcode, if this is a translation.
   */
  public function importContent($entity_type_id, $uuid, $langcode = NULL);

  /**
   * Gets chunked arrays of content names to import.
   *
   * Chunks should be imported synchronously, but within each chunk any amount
   * of concurrency should be acceptable.
   *
   * @return array
   *   An array of arrays of content names to import.
   */
  public function getChunkedNames();

  /**
   * Gets or sets importing state.
   *
   * @param bool $importing
   *   The importing state to set.
   *
   * @return bool
   *   Returns TRUE if importing, FALSE otherwise.
   */
  public function isImporting($importing = NULL);

  /**
   * Imports all files from the file directory.
   */
  public function importFiles();

}

Members

Namesort descending Modifiers Type Description Overrides
ImporterInterface::getChunkedNames public function Gets chunked arrays of content names to import. 1
ImporterInterface::importContent public function Imports a content entity from the source storage. 1
ImporterInterface::importFiles public function Imports all files from the file directory. 1
ImporterInterface::isImporting public function Gets or sets importing state. 1
ImporterInterface::STATE_KEY_IMPORTING constant The key user interfaces should use to see if they're running an import.