Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PluginID.php

class PluginID

Same name in this branch
  1. 11.1.x core/lib/Drupal/Component/Plugin/Attribute/PluginID.php \Drupal\Component\Plugin\Attribute\PluginID

Defines a Plugin annotation object that just contains an ID.

Hierarchy

  • class \Drupal\Component\Annotation\AnnotationBase implements \Drupal\Component\Annotation\AnnotationInterface
    • class \Drupal\Component\Annotation\PluginID extends \Drupal\Component\Annotation\AnnotationBase

Expanded class hierarchy of PluginID

Related topics

Annotations
Annotations for class discovery and metadata description.
2 files declare their use of PluginID
RenderElement.php in core/lib/Drupal/Core/Render/Annotation/RenderElement.php
ViewsHandlerAnnotationBase.php in core/modules/views/src/Annotation/ViewsHandlerAnnotationBase.php

File

core/lib/Drupal/Component/Annotation/PluginID.php, line 10

Namespace

Drupal\Component\Annotation
View source
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 [
            'id' => $this->value,
            'class' => $this->class,
            'provider' => $this->provider,
        ];
    }
    
    /**
     * {@inheritdoc}
     */
    public function getId() {
        return $this->value;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
AnnotationBase::$class protected property The class used for this annotated class.
AnnotationBase::$id public property The annotated class ID.
AnnotationBase::$provider protected property The provider of the annotated class.
AnnotationBase::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
AnnotationBase::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
AnnotationBase::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
AnnotationBase::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
PluginID::$value public property The plugin ID.
PluginID::get public function Gets the value of an annotation. Overrides AnnotationInterface::get
PluginID::getId public function Gets the unique ID for this annotated class. Overrides AnnotationBase::getId
RSS feed
Powered by Drupal