class KeyType in Key 8
Defines a key type annotation object.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\key\Annotation\KeyType
Expanded class hierarchy of KeyType
5 classes are annotated with KeyType
- AuthenticationKeyType in src/
Plugin/ KeyType/ AuthenticationKeyType.php - Defines a generic key type for authentication.
- AuthenticationMultivalueKeyType in src/
Plugin/ KeyType/ AuthenticationMultivalueKeyType.php - Defines a generic key type for authentication with multiple values.
- EncryptionKeyType in src/
Plugin/ KeyType/ EncryptionKeyType.php - Defines a generic key type for encryption.
- MultiValueKeyType in tests/
modules/ key_test/ src/ Plugin/ KeyType/ MultiValueKeyType.php - Defines a key type that is multi-value.
- UserPasswordKeyType in src/
Plugin/ KeyType/ UserPasswordKeyType.php - Defines a key that combines a user name and password.
File
- src/
Annotation/ KeyType.php, line 12
Namespace
Drupal\key\AnnotationView source
class KeyType extends Plugin {
/**
* The plugin ID of the key type.
*
* @var string
*/
public $id;
/**
* The human-readable name of the key type.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $label;
/**
* The description of the key type.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $description;
/**
* The group to which this key type belongs.
*
* This is the general category of this type of key. Examples include
* "authentication" and "encryption". The default group is "none".
*
* @var string
*/
public $group = 'none';
/**
* The settings to use when a key value can be submitted.
*
* This is used to indicate which key input plugin should be used
* to receive the key value (if the provider accepts a key value).
* The default key input plugin is text_field.
*
* @var array
*/
public $key_value = [
'plugin' => 'text_field',
];
/**
* The fields available in keys with multiple values.
*
* This is used to indicate if a key type supports multiple values and,
* if so, information about its fields. Fields can be defined in either
* of the following two formats.
*
* Simple:
* "username" = @Translation("User name")
*
* Complex:
* "password" = {
* "label" = @Translation("Password"),
* "required" = false
* }
*
* Fields are assumed to be required, unless otherwise specified.
*
* @var array
*/
public $multivalue = [
'enabled' => FALSE,
'fields' => [],
];
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
KeyType:: |
public | property | The description of the key type. | |
KeyType:: |
public | property | The group to which this key type belongs. | |
KeyType:: |
public | property | The plugin ID of the key type. | |
KeyType:: |
public | property | The settings to use when a key value can be submitted. | |
KeyType:: |
public | property | The human-readable name of the key type. | |
KeyType:: |
public | property | The fields available in keys with multiple values. | |
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 |