class NullIdMap in Drupal 8
Same name and namespace in other branches
- 9 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
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\migrate\Plugin\migrate\id_map\NullIdMap implements MigrateIdMapInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of NullIdMap
1 file declares its use of NullIdMap
- MigrateNullIdMapTest.php in core/
modules/ migrate/ tests/ src/ Unit/ MigrateNullIdMapTest.php
File
- core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ NullIdMap.php, line 18
Namespace
Drupal\migrate\Plugin\migrate\id_mapView 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 lookupDestinationId(array $source_id_values) {
@trigger_error(__NAMESPACE__ . '\\NullIdMap::lookupDestinationId() is deprecated in drupal:8.1.0 and is removed from drupal:9.0.0. Use Sql::lookupDestinationIds() instead. See https://www.drupal.org/node/2725809', E_USER_DEPRECATED);
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 getMessageIterator(array $source_id_values = [], $level = NULL) {
@trigger_error('getMessageIterator() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use getMessages() instead. See https://www.drupal.org/node/3060969', E_USER_DEPRECATED);
return $this
->getMessages($source_id_values, $level);
}
/**
* {@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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
MigrateIdMapInterface:: |
constant | Indicates that the data for the row is to be deleted. | ||
MigrateIdMapInterface:: |
constant | Indicates that the data for the row is to be preserved. | ||
MigrateIdMapInterface:: |
constant | Indicates that the import of the row failed. | ||
MigrateIdMapInterface:: |
constant | Indicates that the import of the row was ignored. | ||
MigrateIdMapInterface:: |
constant | Indicates that the import of the row was successful. | ||
MigrateIdMapInterface:: |
constant | Indicates that the row needs to be updated. | ||
NullIdMap:: |
public | function |
Clears all messages from the map. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function | ||
NullIdMap:: |
public | function |
Looks up the destination identifier currently being iterated. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Looks up the source identifier(s) currently being iterated. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Deletes the map and message entries for a given source record. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Deletes the map and message table entries for a given destination row. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Removes any persistent storage used by this map. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Returns the number of items that failed to import. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Retrieves an iterator over messages relate to source records. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Retrieves a traversable object of messages related to source records. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Gets the qualified map table. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Retrieves a row by the destination identifiers. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Retrieves a row from the map table based on source identifier values. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Retrieves an array of map rows marked as needing update. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Returns the number of imported items in the map. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function | ||
NullIdMap:: |
public | function |
Looks up the destination identifier corresponding to a source key. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Looks up the destination identifiers corresponding to a source key. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Looks up the source identifier. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Returns the number of messages saved. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function | ||
NullIdMap:: |
public | function |
Prepares to run a full update. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Returns the number of processed items in the map. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function | ||
NullIdMap:: |
public | function |
Saves a mapping from the source identifiers to the destination identifiers. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Saves a message related to a source record in the migration message table. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Sets the migrate message service. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Sets a specified record to be updated, if it exists. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function |
Returns a count of items which are marked as needing update. Overrides MigrateIdMapInterface:: |
|
NullIdMap:: |
public | function | ||
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
PluginBase:: |
public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | 92 |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |