You are here

class KeyProvider in Key 8

Defines a key provider annotation object.

Hierarchy

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\Annotation
View 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

Namesort descending Modifiers Type Description Overrides
KeyProvider::$description public property The description of the key provider.
KeyProvider::$id public property The plugin ID of the key provider.
KeyProvider::$key_value public property The settings for inputting a key value.
KeyProvider::$label public property The human-readable name of the key provider.
KeyProvider::$storage_method public property The storage method of the key provider.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2