function RestResource::__construct
Same name in other branches
- 11.x core/modules/rest/src/Attribute/RestResource.php \Drupal\rest\Attribute\RestResource::__construct()
Constructs a RestResource attribute.
Parameters
string $id: The REST resource plugin ID.
\Drupal\Core\StringTranslation\TranslatableMarkup $label: The human-readable name of the REST resource plugin.
string|null $serialization_class: (optional) The serialization class to deserialize serialized data into.
class-string|null $deriver: (optional) The deriver class for the rest resource.
array $uri_paths: (optional) The URI paths that this REST resource plugin provides.
- key: The link relation type plugin ID.
- value: The URL template.
Overrides Plugin::__construct
See also
\Symfony\Component\Serializer\SerializerInterface
core/core.link_relation_types.yml
File
-
core/
modules/ rest/ src/ Attribute/ RestResource.php, line 46
Class
- RestResource
- Defines a REST resource attribute object.
Namespace
Drupal\rest\AttributeCode
public function __construct(string $id, TranslatableMarkup $label, ?string $serialization_class = NULL, ?string $deriver = NULL, array $uri_paths = []) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.