8.5.x SourcePluginBase.php SourcePluginBase::key()
8.0.x SourcePluginBase.php SourcePluginBase::key()
8.1.x SourcePluginBase.php SourcePluginBase::key()
8.2.x SourcePluginBase.php SourcePluginBase::key()
8.3.x SourcePluginBase.php SourcePluginBase::key()
8.4.x SourcePluginBase.php SourcePluginBase::key()
8.6.x SourcePluginBase.php SourcePluginBase::key()

Gets the iterator key.

Implementation of \Iterator::key() - called when entering a loop iteration, returning the key of the current row. It must be a scalar - we will serialize to fulfill the requirement, but using getCurrentIds() is preferable.

File

core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php, line 306

Class

SourcePluginBase
The base class for source plugins.

Namespace

Drupal\migrate\Plugin\migrate\source

Code

public function key() {
  return serialize($this->currentSourceIds);
}