1. 8.5.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.3.x core/modules/rest/src/Annotation/RestResource.php
  6. 8.4.x core/modules/rest/src/Annotation/RestResource.php
  7. 8.6.x core/modules/rest/src/Annotation/RestResource.php

Namespace

Drupal\rest\Annotation

File

core/modules/rest/src/Annotation/RestResource.php
View source
<?php

namespace Drupal\rest\Annotation;

use Drupal\Component\Annotation\Plugin;

/**
 * Defines a REST resource annotation object.
 *
 * Plugin Namespace: Plugin\rest\resource
 *
 * For a working example, see \Drupal\dblog\Plugin\rest\resource\DBLogResource
 *
 * @see \Drupal\rest\Plugin\Type\ResourcePluginManager
 * @see \Drupal\rest\Plugin\ResourceBase
 * @see \Drupal\rest\Plugin\ResourceInterface
 * @see plugin_api
 *
 * @ingroup third_party
 *
 * @Annotation
 */
class RestResource extends Plugin {

  /**
   * The resource plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The human-readable name of the resource plugin.
   *
   * @ingroup plugin_translatable
   *
   * @var \Drupal\Core\Annotation\Translation
   */
  public $label;

  /**
   * The serialization class to deserialize serialized data into.
   *
   * @var string (optional)
   */
  public $serialization_class;

}

Classes

Namesort descending Description
RestResource Defines a REST resource annotation object.