You are here

class PluginDefinition in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Plugin/Definition/PluginDefinition.php \Drupal\Component\Plugin\Definition\PluginDefinition

Provides object-based plugin definitions.

Hierarchy

Expanded class hierarchy of PluginDefinition

7 files declare their use of PluginDefinition
AnnotationBridgeDecoratorTest.php in core/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php
ContextAwarePluginBaseTest.php in core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginBaseTest.php
ContextHandlerTest.php in core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
Contains \Drupal\Tests\Core\Plugin\ContextHandlerTest.
DefaultPluginManagerTest.php in core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php
EntityType.php in core/lib/Drupal/Core/Entity/EntityType.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

Namesort descending Modifiers Type Description 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
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 1