You are here

RestResource.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 core/modules/rest/src/Annotation/RestResource.php

File

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

/**
 * @file
 * Contains \Drupal\rest\Annotation\RestResource.
 */
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;

}

Classes

Namesort descending Description
RestResource Defines a REST resource annotation object.