1. 8.3.x core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php
  2. 8.0.x core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php
  3. 8.1.x core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php
  4. 8.2.x core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php
  5. 8.4.x core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php

Namespace

Drupal\plugin_test\Plugin\Annotation

File

core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php
View source
  1. <?php
  2. namespace Drupal\plugin_test\Plugin\Annotation;
  3. use Drupal\Component\Annotation\AnnotationBase;
  4. /**
  5. * Defines a custom Plugin annotation.
  6. *
  7. * @Annotation
  8. */
  9. class PluginExample extends AnnotationBase {
  10. /**
  11. * The plugin ID.
  12. *
  13. * @var string
  14. */
  15. public $id;
  16. /**
  17. * Another plugin metadata.
  18. *
  19. * @var string
  20. */
  21. public $custom;
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function get() {
  26. return array(
  27. 'id' => $this->id,
  28. 'custom' => $this->custom,
  29. 'class' => $this->class,
  30. 'provider' => $this->provider,
  31. );
  32. }
  33. }

Classes

Namesort descending Description
PluginExample Defines a custom Plugin annotation.