You are here

public static function MultiValueKeyType::generateKeyValue in Key 8

Generate a key value of this type using the submitted configuration.

Parameters

array $configuration: The configuration for the key type plugin.

Return value

string The generated key value.

Overrides KeyTypeInterface::generateKeyValue

File

tests/modules/key_test/src/Plugin/KeyType/MultiValueKeyType.php, line 51

Class

MultiValueKeyType
Defines a key type that is multi-value.

Namespace

Drupal\key_test\Plugin\KeyType

Code

public static function generateKeyValue(array $configuration) {
  return json_encode([
    'first' => '',
    'second' => '',
  ]);
}