function AttributeClassDiscovery::prepareAttributeDefinition
Same name in this branch
- 11.x core/lib/Drupal/Core/Plugin/Discovery/AttributeClassDiscovery.php \Drupal\Core\Plugin\Discovery\AttributeClassDiscovery::prepareAttributeDefinition()
Same name in other branches
- 10 core/lib/Drupal/Core/Plugin/Discovery/AttributeClassDiscovery.php \Drupal\Core\Plugin\Discovery\AttributeClassDiscovery::prepareAttributeDefinition()
- 10 core/lib/Drupal/Component/Plugin/Discovery/AttributeClassDiscovery.php \Drupal\Component\Plugin\Discovery\AttributeClassDiscovery::prepareAttributeDefinition()
Prepares the attribute definition.
Parameters
\Drupal\Component\Plugin\Attribute\AttributeInterface $attribute: The attribute derived from the plugin.
string $class: The class used for the plugin.
2 calls to AttributeClassDiscovery::prepareAttributeDefinition()
- AttributeClassDiscovery::parseClass in core/
lib/ Drupal/ Component/ Plugin/ Discovery/ AttributeClassDiscovery.php - Parses attributes from a class.
- AttributeClassDiscovery::prepareAttributeDefinition in core/
lib/ Drupal/ Core/ Plugin/ Discovery/ AttributeClassDiscovery.php
1 method overrides AttributeClassDiscovery::prepareAttributeDefinition()
- AttributeClassDiscovery::prepareAttributeDefinition in core/
lib/ Drupal/ Core/ Plugin/ Discovery/ AttributeClassDiscovery.php
File
-
core/
lib/ Drupal/ Component/ Plugin/ Discovery/ AttributeClassDiscovery.php, line 161
Class
- AttributeClassDiscovery
- Defines a discovery mechanism to find plugins with attributes.
Namespace
Drupal\Component\Plugin\DiscoveryCode
protected function prepareAttributeDefinition(AttributeInterface $attribute, string $class) : void {
$attribute->setClass($class);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.