You are here

PluginID.php in Service Container 7

Same filename and directory in other branches
  1. 7.2 lib/Drupal/Component/Annotation/PluginID.php

File

lib/Drupal/Component/Annotation/PluginID.php
View source
<?php

/**
 * @file
 * Contains \Drupal\Component\Annotation\PluginID.
 */
namespace Drupal\Component\Annotation;


/**
 * Defines a Plugin annotation object that just contains an ID.
 *
 * @Annotation
 */
class PluginID extends AnnotationBase {

  /**
   * The plugin ID.
   *
   * When an annotation is given no key, 'value' is assumed by Doctrine.
   *
   * @var string
   */
  public $value;

  /**
   * {@inheritdoc}
   */
  public function get() {
    return array(
      'id' => $this->value,
      'class' => $this->class,
      'provider' => $this->provider,
    );
  }

  /**
   * {@inheritdoc}
   */
  public function getId() {
    return $this->value;
  }

}

Classes

Namesort descending Description
PluginID Defines a Plugin annotation object that just contains an ID.