1. 8.3.x core/modules/rest/src/Annotation/RestResource.php
  2. 8.0.x core/modules/rest/src/Annotation/RestResource.php
  3. 8.1.x core/modules/rest/src/Annotation/RestResource.php
  4. 8.2.x core/modules/rest/src/Annotation/RestResource.php
  5. 8.4.x core/modules/rest/src/Annotation/RestResource.php

Namespace

Drupal\rest\Annotation

File

core/modules/rest/src/Annotation/RestResource.php
View source
  1. <?php
  2. namespace Drupal\rest\Annotation;
  3. use \Drupal\Component\Annotation\Plugin;
  4. /**
  5. * Defines a REST resource annotation object.
  6. *
  7. * Plugin Namespace: Plugin\rest\resource
  8. *
  9. * For a working example, see \Drupal\dblog\Plugin\rest\resource\DBLogResource
  10. *
  11. * @see \Drupal\rest\Plugin\Type\ResourcePluginManager
  12. * @see \Drupal\rest\Plugin\ResourceBase
  13. * @see \Drupal\rest\Plugin\ResourceInterface
  14. * @see plugin_api
  15. *
  16. * @ingroup third_party
  17. *
  18. * @Annotation
  19. */
  20. class RestResource extends Plugin {
  21. /**
  22. * The resource plugin ID.
  23. *
  24. * @var string
  25. */
  26. public $id;
  27. /**
  28. * The human-readable name of the resource plugin.
  29. *
  30. * @ingroup plugin_translatable
  31. *
  32. * @var \Drupal\Core\Annotation\Translation
  33. */
  34. public $label;
  35. /**
  36. * The serialization class to deserialize serialized data into.
  37. *
  38. * @var string (optional)
  39. */
  40. public $serialization_class;
  41. }

Classes

Namesort descending Description
RestResource Defines a REST resource annotation object.