class PluginID

Same name in this branch
  1. main core/lib/Drupal/Component/Annotation/PluginID.php \Drupal\Component\Annotation\PluginID
Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Component/Annotation/PluginID.php \Drupal\Component\Annotation\PluginID
  2. 11.x core/lib/Drupal/Component/Plugin/Attribute/PluginID.php \Drupal\Component\Plugin\Attribute\PluginID
  3. 10 core/lib/Drupal/Component/Annotation/PluginID.php \Drupal\Component\Annotation\PluginID
  4. 10 core/lib/Drupal/Component/Plugin/Attribute/PluginID.php \Drupal\Component\Plugin\Attribute\PluginID
  5. 9 core/lib/Drupal/Component/Annotation/PluginID.php \Drupal\Component\Annotation\PluginID
  6. 8.9.x core/lib/Drupal/Component/Annotation/PluginID.php \Drupal\Component\Annotation\PluginID

Defines a Plugin attribute object that just contains an ID.

Attributes

#[\Attribute(\Attribute::TARGET_CLASS)]

Hierarchy

Expanded class hierarchy of PluginID

12 files declare their use of PluginID
MigrateFieldPluginManager.php in core/modules/migrate_drupal/src/Plugin/MigrateFieldPluginManager.php
MigratePluginManager.php in core/modules/migrate/src/Plugin/MigratePluginManager.php
NullIdMap.php in core/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php
PluginIdTest.php in core/tests/Drupal/Tests/Component/Plugin/Attribute/PluginIdTest.php
PluginManager.php in core/modules/system/tests/modules/lazy_route_provider_install_test/src/PluginManager.php

... See full list

File

core/lib/Drupal/Component/Plugin/Attribute/PluginID.php, line 8

Namespace

Drupal\Component\Plugin\Attribute
View source
class PluginID extends AttributeBase {
  
  /**
   * {@inheritdoc}
   */
  public function get() : array {
    return [
      'id' => $this->getId(),
      'class' => $this->getClass(),
      'provider' => $this->getProvider(),
    ];
  }

}

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