1. 8.3.x core/lib/Drupal/Component/Annotation/PluginID.php
  2. 8.0.x core/lib/Drupal/Component/Annotation/PluginID.php
  3. 8.1.x core/lib/Drupal/Component/Annotation/PluginID.php
  4. 8.2.x core/lib/Drupal/Component/Annotation/PluginID.php
  5. 8.4.x core/lib/Drupal/Component/Annotation/PluginID.php

Namespace

Drupal\Component\Annotation

File

core/lib/Drupal/Component/Annotation/PluginID.php
View source
  1. <?php
  2. namespace Drupal\Component\Annotation;
  3. /**
  4. * Defines a Plugin annotation object that just contains an ID.
  5. *
  6. * @Annotation
  7. */
  8. class PluginID extends AnnotationBase {
  9. /**
  10. * The plugin ID.
  11. *
  12. * When an annotation is given no key, 'value' is assumed by Doctrine.
  13. *
  14. * @var string
  15. */
  16. public $value;
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public function get() {
  21. return array(
  22. 'id' => $this->value,
  23. 'class' => $this->class,
  24. 'provider' => $this->provider,
  25. );
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function getId() {
  31. return $this->value;
  32. }
  33. }

Classes

Namesort descending Description
PluginID Defines a Plugin annotation object that just contains an ID.