Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SourcePluginBase.php

function 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 358

Class

SourcePluginBase
The base class for source plugins.

Namespace

Drupal\migrate\Plugin\migrate\source

Code

public function key() : mixed {
    return serialize($this->currentSourceIds);
}
RSS feed
Powered by Drupal