function MenuLinkParent::__construct

Same name and namespace in other branches
  1. 11.x core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php \Drupal\migrate\Plugin\migrate\process\MenuLinkParent::__construct()
  2. 10 core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php \Drupal\migrate\Plugin\migrate\process\MenuLinkParent::__construct()
  3. 9 core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php \Drupal\migrate\Plugin\migrate\process\MenuLinkParent::__construct()
  4. 8.9.x core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php \Drupal\migrate\Plugin\migrate\process\MenuLinkParent::__construct()

Constructs a MenuLinkParent object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\migrate\MigrateLookupInterface $migrateLookup: The migrate lookup service.

\Drupal\Core\Menu\MenuLinkManagerInterface $menuLinkManager: The menu link manager.

\Drupal\Core\Entity\EntityStorageInterface $menuLinkStorage: The menu link storage object.

\Drupal\migrate\Plugin\MigrationInterface $migration: The currently running migration.

Overrides PluginBase::__construct

File

core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php, line 120

Class

MenuLinkParent
Determines the parent of a menu link.

Namespace

Drupal\migrate\Plugin\migrate\process

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, protected MigrateLookupInterface $migrateLookup, protected MenuLinkManagerInterface $menuLinkManager, protected EntityStorageInterface $menuLinkStorage, protected MigrationInterface $migration) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->lookupMigrations = $this->configuration['lookup_migrations'] ?? [
    $this->migration
      ->id(),
  ];
}

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