Skip to content
Snippets Groups Projects

Add attributes for all annotations

Closed Patrick Kenny requested to merge issue/key-3483550:key_provider_attribute into 8.x-1.x
14 files
+ 254
0
Compare changes
  • Side-by-side
  • Inline
Files
14
+ 31
0
 
<?php
 
 
namespace Drupal\key\Attribute;
 
 
use Drupal\Component\Plugin\Attribute\Plugin;
 
use Drupal\Core\StringTranslation\TranslatableMarkup;
 
 
/**
 
* Defines the Key Input attribute.
 
*/
 
#[\Attribute(\Attribute::TARGET_CLASS)]
 
class KeyInput extends Plugin {
 
 
/**
 
* Contructs a KeyInput attribute.
 
*
 
* @param string $id
 
* The plugin ID of the key input.
 
* @param \Drupal\Core\StringTranslation\TranslatableMarkup $label
 
* The human-readable name of the key input.
 
* @param \Drupal\Core\StringTranslation\TranslatableMarkup $description
 
* The description of the key input.
 
*/
 
public function __construct(
 
public readonly string $id,
 
public readonly TranslatableMarkup $label,
 
public readonly TranslatableMarkup $description,
 
) {
 
}
 
 
}
Loading