function BlockPluginId::__construct
Constructs a BlockPluginId object.
Parameters
array $configuration: The plugin configuration.
string $plugin_id: The plugin ID.
mixed $plugin_definition: The plugin definition.
\Drupal\Core\Entity\EntityStorageInterface $storage: The block content storage object.
\Drupal\migrate\MigrateLookupInterface $migrate_lookup: The migrate lookup service.
Overrides PluginBase::__construct
File
- 
              core/modules/ block/ src/ Plugin/ migrate/ process/ BlockPluginId.php, line 66 
Class
- BlockPluginId
- Plugin annotation @MigrateProcessPlugin( id = "block_plugin_id" )
Namespace
Drupal\block\Plugin\migrate\processCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityStorageInterface $storage, $migrate_lookup) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  if ($migrate_lookup instanceof MigrateProcessInterface) {
    @trigger_error('Passing a migration process plugin as the fifth argument to ' . __METHOD__ . ' is deprecated in drupal:8.8.0 and will throw an error in drupal:9.0.0. Pass the migrate.lookup service instead. See https://www.drupal.org/node/3047268', E_USER_DEPRECATED);
    $this->migrationPlugin = $migrate_lookup;
    $migrate_lookup = \Drupal::service('migrate.lookup');
  }
  elseif (!$migrate_lookup instanceof MigrateLookupInterface) {
    throw new \InvalidArgumentException("The fifth argument to " . __METHOD__ . " must be an instance of MigrateLookupInterface.");
  }
  $this->blockContentStorage = $storage;
  $this->migrateLookup = $migrate_lookup;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
