comparison core/modules/rest/src/Annotation/RestResource.php @ 0:4c8ae668cc8c

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