class NullIdMap

Same name in other branches
  1. 8.9.x core/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php \Drupal\migrate\Plugin\migrate\id_map\NullIdMap
  2. 10 core/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php \Drupal\migrate\Plugin\migrate\id_map\NullIdMap
  3. 11.x 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

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
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
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 6
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.