PluginDefinition.php 809 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace Drupal\Component\Plugin\Definition;
  3. /**
  4. * Provides object-based plugin definitions.
  5. */
  6. class PluginDefinition implements PluginDefinitionInterface {
  7. /**
  8. * The plugin ID.
  9. *
  10. * @var string
  11. */
  12. protected $id;
  13. /**
  14. * A fully qualified class name.
  15. *
  16. * @var string
  17. */
  18. protected $class;
  19. /**
  20. * The plugin provider.
  21. *
  22. * @var string
  23. */
  24. protected $provider;
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function id() {
  29. return $this->id;
  30. }
  31. /**
  32. * {@inheritdoc}
  33. */
  34. public function setClass($class) {
  35. $this->class = $class;
  36. return $this;
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function getClass() {
  42. return $this->class;
  43. }
  44. /**
  45. * {@inheritdoc}
  46. */
  47. public function getProvider() {
  48. return $this->provider;
  49. }
  50. }