You are here

class ServiceDefinition in Services 8.4

Same name and namespace in other branches
  1. 9.0.x src/Annotation/ServiceDefinition.php \Drupal\services\Annotation\ServiceDefinition

Defines a service definition annotation object.

Hierarchy

Expanded class hierarchy of ServiceDefinition

11 classes are annotated with ServiceDefinition
AliasGet in src/Plugin/ServiceDefinition/AliasGet.php
Plugin annotation @ServiceDefinition( id = "alias_get", methods = { "GET" }, translatable = true, deriver = "\Drupal\services\Plugin\Deriver\AliasGet" )
EntityDelete in src/Plugin/ServiceDefinition/EntityDelete.php
Plugin annotation @ServiceDefinition( id = "entity_delete", methods = { "DELETE" }, translatable = true, deriver = "\Drupal\services\Plugin\Deriver\EntityDelete" )
EntityGet in src/Plugin/ServiceDefinition/EntityGet.php
Plugin annotation @ServiceDefinition( id = "entity_get", methods = { "GET" }, translatable = true, deriver = "\Drupal\services\Plugin\Deriver\EntityGet" )
EntityIndex in src/Plugin/ServiceDefinition/EntityIndex.php
Plugin annotation @ServiceDefinition( id = "entity_index", methods = { "GET" }, translatable = true, deriver = "\Drupal\services\Plugin\Deriver\EntityIndex" )
EntityPost in src/Plugin/ServiceDefinition/EntityPost.php
Plugin annotation @ServiceDefinition( id = "entity_post", methods = { "POST" }, translatable = true, response_code = 201, deriver = "\Drupal\services\Plugin\Deriver\EntityPost" )

... See full list

File

src/Annotation/ServiceDefinition.php, line 12

Namespace

Drupal\services\Annotation
View source
class ServiceDefinition extends Plugin {

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

  /**
   * The human-readable name of the service definition.
   *
   * @ingroup plugin_translatable
   *
   * @var \Drupal\Core\Annotation\Translation
   */
  public $title;

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

  /**
   * The appended path from the endpoint.
   *
   * @var string
   */
  public $path;

  /**
   * The method this Service Definition utilizes.
   *
   * @var array
   */
  public $methods;

  /**
   * The description shown to users.
   *
   * @ingroup plugin_translatable
   *
   * @var \Drupal\Core\Annotation\Translation
   */
  public $description;

  /**
   * The service definition supports translations.
   *
   * @var bool
   */
  public $translatable;

  /**
   * The service definition contexts.
   *
   * @var \Drupal\Core\Annotation\ContextDefinition[]
   */
  public $contexts;

  /**
   * The successful response code for this definition.
   *
   * @var int
   */
  public $response_code = 200;

}

Members

Namesort descending Modifiers Type Description Overrides
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2
ServiceDefinition::$category public property The human-readable name of the service category.
ServiceDefinition::$contexts public property The service definition contexts.
ServiceDefinition::$description public property The description shown to users.
ServiceDefinition::$id public property The plugin ID.
ServiceDefinition::$methods public property The method this Service Definition utilizes.
ServiceDefinition::$path public property The appended path from the endpoint.
ServiceDefinition::$response_code public property The successful response code for this definition.
ServiceDefinition::$title public property The human-readable name of the service definition.
ServiceDefinition::$translatable public property The service definition supports translations.