class KeyProvider in Key 8
Defines a key provider annotation object.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\key\Annotation\KeyProvider
Expanded class hierarchy of KeyProvider
4 classes are annotated with KeyProvider
- ConfigKeyProvider in src/
Plugin/ KeyProvider/ ConfigKeyProvider.php - Adds a key provider that allows a key to be stored in configuration.
- EnvKeyProvider in src/
Plugin/ KeyProvider/ EnvKeyProvider.php - A key provider that allows a key to be stored in an environment variable.
- FileKeyProvider in src/
Plugin/ KeyProvider/ FileKeyProvider.php - Adds a key provider that allows a key to be stored in a file.
- State in tests/
modules/ key_test/ src/ Plugin/ KeyProvider/ State.php - Defines a key provider that stores in memory.
File
- src/
Annotation/ KeyProvider.php, line 12
Namespace
Drupal\key\AnnotationView source
class KeyProvider extends Plugin {
/**
* The plugin ID of the key provider.
*
* @var string
*/
public $id;
/**
* The human-readable name of the key provider.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $label;
/**
* The description of the key provider.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $description;
/**
* The storage method of the key provider.
*
* This is an enumeration of {file, config, database, remote}.
*
* @var string
*/
public $storage_method;
/**
* The settings for inputting a key value.
*
* This is used to indicate to the key input plugin if this provider
* accepts a key value and if it requires one.
*
* @var array
*/
public $key_value = [
'accepted' => FALSE,
'required' => FALSE,
];
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
KeyProvider:: |
public | property | The description of the key provider. | |
KeyProvider:: |
public | property | The plugin ID of the key provider. | |
KeyProvider:: |
public | property | The settings for inputting a key value. | |
KeyProvider:: |
public | property | The human-readable name of the key provider. | |
KeyProvider:: |
public | property | The storage method of the key provider. | |
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
5 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function | Constructs a Plugin object. | 2 |