Mercurial > hg > isophonics-drupal-site
annotate core/modules/rest/src/Annotation/RestResource.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\rest\Annotation; |
Chris@0 | 4 |
Chris@0 | 5 use Drupal\Component\Annotation\Plugin; |
Chris@0 | 6 |
Chris@0 | 7 /** |
Chris@0 | 8 * Defines a REST resource annotation object. |
Chris@0 | 9 * |
Chris@0 | 10 * Plugin Namespace: Plugin\rest\resource |
Chris@0 | 11 * |
Chris@0 | 12 * For a working example, see \Drupal\dblog\Plugin\rest\resource\DBLogResource |
Chris@0 | 13 * |
Chris@0 | 14 * @see \Drupal\rest\Plugin\Type\ResourcePluginManager |
Chris@0 | 15 * @see \Drupal\rest\Plugin\ResourceBase |
Chris@0 | 16 * @see \Drupal\rest\Plugin\ResourceInterface |
Chris@0 | 17 * @see plugin_api |
Chris@0 | 18 * |
Chris@0 | 19 * @ingroup third_party |
Chris@0 | 20 * |
Chris@0 | 21 * @Annotation |
Chris@0 | 22 */ |
Chris@0 | 23 class RestResource extends Plugin { |
Chris@0 | 24 |
Chris@0 | 25 /** |
Chris@0 | 26 * The REST resource plugin ID. |
Chris@0 | 27 * |
Chris@0 | 28 * @var string |
Chris@0 | 29 */ |
Chris@0 | 30 public $id; |
Chris@0 | 31 |
Chris@0 | 32 /** |
Chris@0 | 33 * The human-readable name of the REST resource plugin. |
Chris@0 | 34 * |
Chris@0 | 35 * @ingroup plugin_translatable |
Chris@0 | 36 * |
Chris@0 | 37 * @var \Drupal\Core\Annotation\Translation |
Chris@0 | 38 */ |
Chris@0 | 39 public $label; |
Chris@0 | 40 |
Chris@0 | 41 /** |
Chris@0 | 42 * The serialization class to deserialize serialized data into. |
Chris@0 | 43 * |
Chris@0 | 44 * @see \Symfony\Component\Serializer\SerializerInterface's "type" parameter. |
Chris@0 | 45 * |
Chris@0 | 46 * @var string (optional) |
Chris@0 | 47 */ |
Chris@0 | 48 public $serialization_class; |
Chris@0 | 49 |
Chris@0 | 50 /** |
Chris@0 | 51 * The URI paths that this REST resource plugin provides. |
Chris@0 | 52 * |
Chris@0 | 53 * Key-value pairs, with link relation type plugin IDs as keys, and URL |
Chris@0 | 54 * templates as values. |
Chris@0 | 55 * |
Chris@0 | 56 * @see core/core.link_relation_types.yml |
Chris@0 | 57 * |
Chris@0 | 58 * @var string[] |
Chris@0 | 59 */ |
Chris@0 | 60 public $uri_paths = []; |
Chris@0 | 61 |
Chris@0 | 62 } |