You are here

class NullIdMap in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php \Drupal\migrate\Plugin\migrate\id_map\NullIdMap

Defines the null ID map implementation.

This serves as a dummy in order to not store anything.

Plugin annotation

@PluginID("null");

Hierarchy

Expanded class hierarchy of NullIdMap

File

core/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php, line 18

Namespace

Drupal\migrate\Plugin\migrate\id_map
View source
class NullIdMap extends PluginBase implements MigrateIdMapInterface {

  /**
   * {@inheritdoc}
   */
  public function setMessage(MigrateMessageInterface $message) {

    // Do nothing.
  }

  /**
   * {@inheritdoc}
   */
  public function getRowBySource(array $source_id_values) {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function getRowByDestination(array $destination_id_values) {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function getRowsNeedingUpdate($count) {
    return 0;
  }

  /**
   * {@inheritdoc}
   */
  public function lookupSourceId(array $destination_id_values) {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function lookupDestinationIds(array $source_id_values) {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function saveIdMapping(Row $row, array $destination_id_values, $source_row_status = MigrateIdMapInterface::STATUS_IMPORTED, $rollback_action = MigrateIdMapInterface::ROLLBACK_DELETE) {

    // Do nothing.
  }

  /**
   * {@inheritdoc}
   */
  public function saveMessage(array $source_id_values, $message, $level = MigrationInterface::MESSAGE_ERROR) {

    // Do nothing.
  }

  /**
   * {@inheritdoc}
   */
  public function getMessages(array $source_id_values = [], $level = NULL) {
    return new \ArrayIterator([]);
  }

  /**
   * {@inheritdoc}
   */
  public function prepareUpdate() {

    // Do nothing.
  }

  /**
   * {@inheritdoc}
   */
  public function processedCount() {
    return 0;
  }

  /**
   * {@inheritdoc}
   */
  public function importedCount() {
    return 0;
  }

  /**
   * {@inheritdoc}
   */
  public function updateCount() {
    return 0;
  }

  /**
   * {@inheritdoc}
   */
  public function errorCount() {
    return 0;
  }

  /**
   * {@inheritdoc}
   */
  public function messageCount() {
    return 0;
  }

  /**
   * {@inheritdoc}
   */
  public function delete(array $source_id_values, $messages_only = FALSE) {

    // Do nothing.
  }

  /**
   * {@inheritdoc}
   */
  public function deleteDestination(array $destination_id_values) {

    // Do nothing.
  }

  /**
   * {@inheritdoc}
   */
  public function setUpdate(array $source_id_values) {

    // Do nothing.
  }

  /**
   * {@inheritdoc}
   */
  public function clearMessages() {

    // Do nothing.
  }

  /**
   * {@inheritdoc}
   */
  public function destroy() {

    // Do nothing.
  }

  /**
   * {@inheritdoc}
   */
  public function currentDestination() {
    return NULL;
  }

  /**
   * {@inheritdoc}
   */
  public function currentSource() {
    return NULL;
  }

  /**
   * {@inheritdoc}
   */
  public function getQualifiedMapTableName() {
    return '';
  }

  /**
   * {@inheritdoc}
   */
  public function rewind() {
    return NULL;
  }

  /**
   * {@inheritdoc}
   */
  public function current() {
    return NULL;
  }

  /**
   * {@inheritdoc}
   */
  public function key() {
    return '';
  }

  /**
   * {@inheritdoc}
   */
  public function next() {
    return NULL;
  }

  /**
   * {@inheritdoc}
   */
  public function valid() {
    return FALSE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DependencySerializationTrait::$_entityStorages protected property
DependencySerializationTrait::$_serviceIds protected property
DependencySerializationTrait::__sleep public function 2
DependencySerializationTrait::__wakeup public function 2
MessengerTrait::$messenger protected property The messenger. 27
MessengerTrait::messenger public function Gets the messenger. 27
MessengerTrait::setMessenger public function Sets the messenger.
MigrateIdMapInterface::ROLLBACK_DELETE constant Indicates that the data for the row is to be deleted.
MigrateIdMapInterface::ROLLBACK_PRESERVE constant Indicates that the data for the row is to be preserved.
MigrateIdMapInterface::STATUS_FAILED constant Indicates that the import of the row failed.
MigrateIdMapInterface::STATUS_IGNORED constant Indicates that the import of the row was ignored.
MigrateIdMapInterface::STATUS_IMPORTED constant Indicates that the import of the row was successful.
MigrateIdMapInterface::STATUS_NEEDS_UPDATE constant Indicates that the row needs to be updated.
NullIdMap::clearMessages public function Clears all messages from the map. Overrides MigrateIdMapInterface::clearMessages
NullIdMap::current public function
NullIdMap::currentDestination public function Looks up the destination identifier currently being iterated. Overrides MigrateIdMapInterface::currentDestination
NullIdMap::currentSource public function Looks up the source identifier(s) currently being iterated. Overrides MigrateIdMapInterface::currentSource
NullIdMap::delete public function Deletes the map and message entries for a given source record. Overrides MigrateIdMapInterface::delete
NullIdMap::deleteDestination public function Deletes the map and message table entries for a given destination row. Overrides MigrateIdMapInterface::deleteDestination
NullIdMap::destroy public function Removes any persistent storage used by this map. Overrides MigrateIdMapInterface::destroy
NullIdMap::errorCount public function Returns the number of items that failed to import. Overrides MigrateIdMapInterface::errorCount
NullIdMap::getMessages public function Retrieves a traversable object of messages related to source records. Overrides MigrateIdMapInterface::getMessages
NullIdMap::getQualifiedMapTableName public function Gets the qualified map table. Overrides MigrateIdMapInterface::getQualifiedMapTableName
NullIdMap::getRowByDestination public function Retrieves a row by the destination identifiers. Overrides MigrateIdMapInterface::getRowByDestination
NullIdMap::getRowBySource public function Retrieves a row from the map table based on source identifier values. Overrides MigrateIdMapInterface::getRowBySource
NullIdMap::getRowsNeedingUpdate public function Retrieves an array of map rows marked as needing update. Overrides MigrateIdMapInterface::getRowsNeedingUpdate
NullIdMap::importedCount public function Returns the number of imported items in the map. Overrides MigrateIdMapInterface::importedCount
NullIdMap::key public function
NullIdMap::lookupDestinationIds public function Looks up the destination identifiers corresponding to a source key. Overrides MigrateIdMapInterface::lookupDestinationIds
NullIdMap::lookupSourceId public function Looks up the source identifier. Overrides MigrateIdMapInterface::lookupSourceId
NullIdMap::messageCount public function Returns the number of messages saved. Overrides MigrateIdMapInterface::messageCount
NullIdMap::next public function
NullIdMap::prepareUpdate public function Prepares to run a full update. Overrides MigrateIdMapInterface::prepareUpdate
NullIdMap::processedCount public function Returns the number of processed items in the map. Overrides MigrateIdMapInterface::processedCount
NullIdMap::rewind public function
NullIdMap::saveIdMapping public function Saves a mapping from the source identifiers to the destination identifiers. Overrides MigrateIdMapInterface::saveIdMapping
NullIdMap::saveMessage public function Saves a message related to a source record in the migration message table. Overrides MigrateIdMapInterface::saveMessage
NullIdMap::setMessage public function Sets the migrate message service. Overrides MigrateIdMapInterface::setMessage
NullIdMap::setUpdate public function Sets a specified record to be updated, if it exists. Overrides MigrateIdMapInterface::setUpdate
NullIdMap::updateCount public function Returns a count of items which are marked as needing update. Overrides MigrateIdMapInterface::updateCount
NullIdMap::valid public function
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 2
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 98
StringTranslationTrait::$stringTranslation protected property The string translation service. 4
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.