function 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  - Prepares the attribute definition.
 
1 method overrides AttributeClassDiscovery::prepareAttributeDefinition()
- AttributeClassDiscovery::prepareAttributeDefinition in core/
lib/ Drupal/ Core/ Plugin/ Discovery/ AttributeClassDiscovery.php  - Prepares the attribute definition.
 
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.