class PluginDefinition

Same name in other branches
  1. 9 core/lib/Drupal/Component/Plugin/Definition/PluginDefinition.php \Drupal\Component\Plugin\Definition\PluginDefinition
  2. 8.9.x core/lib/Drupal/Component/Plugin/Definition/PluginDefinition.php \Drupal\Component\Plugin\Definition\PluginDefinition
  3. 11.x core/lib/Drupal/Component/Plugin/Definition/PluginDefinition.php \Drupal\Component\Plugin\Definition\PluginDefinition

Provides object-based plugin definitions.

Hierarchy

Expanded class hierarchy of PluginDefinition

9 files declare their use of PluginDefinition
AnnotationBridgeDecoratorTest.php in core/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php
AttributeBridgeDecoratorTest.php in core/tests/Drupal/Tests/Component/Plugin/Discovery/AttributeBridgeDecoratorTest.php
CKEditor5PluginDefinition.php in core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php
ContextAwarePluginTraitTest.php in core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php
ContextHandlerTest.php in core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php

... See full list

File

core/lib/Drupal/Component/Plugin/Definition/PluginDefinition.php, line 8

Namespace

Drupal\Component\Plugin\Definition
View source
class PluginDefinition implements PluginDefinitionInterface {
    
    /**
     * The plugin ID.
     *
     * @var string
     */
    protected $id;
    
    /**
     * A fully qualified class name.
     *
     * @var string
     */
    protected $class;
    
    /**
     * The plugin provider.
     *
     * @var string
     */
    protected $provider;
    
    /**
     * {@inheritdoc}
     */
    public function id() {
        return $this->id;
    }
    
    /**
     * {@inheritdoc}
     */
    public function setClass($class) {
        $this->class = $class;
        return $this;
    }
    
    /**
     * {@inheritdoc}
     */
    public function getClass() {
        return $this->class;
    }
    
    /**
     * {@inheritdoc}
     */
    public function getProvider() {
        return $this->provider;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
PluginDefinition::$class protected property A fully qualified class name.
PluginDefinition::$id protected property The plugin ID. 1
PluginDefinition::$provider protected property The plugin provider.
PluginDefinition::getClass public function Gets the class. Overrides PluginDefinitionInterface::getClass 1
PluginDefinition::getProvider public function Gets the plugin provider. Overrides PluginDefinitionInterface::getProvider
PluginDefinition::id public function Gets the unique identifier of the plugin. Overrides PluginDefinitionInterface::id 1
PluginDefinition::setClass public function Sets the class. Overrides PluginDefinitionInterface::setClass 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.