class PluginID

Same name in this branch
  1. 11.x core/lib/Drupal/Component/Annotation/PluginID.php \Drupal\Component\Annotation\PluginID
Same name in other branches
  1. 9 core/lib/Drupal/Component/Annotation/PluginID.php \Drupal\Component\Annotation\PluginID
  2. 8.9.x core/lib/Drupal/Component/Annotation/PluginID.php \Drupal\Component\Annotation\PluginID
  3. 10 core/lib/Drupal/Component/Annotation/PluginID.php \Drupal\Component\Annotation\PluginID
  4. 10 core/lib/Drupal/Component/Plugin/Attribute/PluginID.php \Drupal\Component\Plugin\Attribute\PluginID

Defines a Plugin attribute object that just contains an ID.

Hierarchy

Expanded class hierarchy of PluginID

10 files declare their use of PluginID
MigratePluginManager.php in core/modules/migrate/src/Plugin/MigratePluginManager.php
NullIdMap.php in core/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php
PluginIdTest.php in core/tests/Drupal/Tests/Component/Plugin/Attribute/PluginIdTest.php
Sql.php in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
ViewsArea.php in core/modules/views/src/Attribute/ViewsArea.php

... See full list

File

core/lib/Drupal/Component/Plugin/Attribute/PluginID.php, line 8

Namespace

Drupal\Component\Plugin\Attribute
View source
class PluginID extends AttributeBase {
    
    /**
     * {@inheritdoc}
     */
    public function get() : array {
        return [
            'id' => $this->getId(),
            'class' => $this->getClass(),
            'provider' => $this->getProvider(),
        ];
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
AttributeBase::$class protected property The class used for this attribute class.
AttributeBase::$provider protected property The provider of the attribute class.
AttributeBase::getClass public function Gets the class of the attribute class. Overrides AttributeInterface::getClass 1
AttributeBase::getId public function Gets the unique ID for this attribute class. Overrides AttributeInterface::getId
AttributeBase::getProvider public function Gets the name of the provider of the attribute class. Overrides AttributeInterface::getProvider
AttributeBase::setClass public function Sets the class of the attributed class. Overrides AttributeInterface::setClass 1
AttributeBase::setProvider public function Sets the name of the provider of the attribute class. Overrides AttributeInterface::setProvider
AttributeBase::__construct public function 1
PluginID::get public function Gets the value of an attribute. Overrides AttributeBase::get

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