public function MultiValueKeyType::serialize in Key 8
Serialize an array of key values into a string.
Parameters
array $array: An array of key values.
Return value
string A serialized string of key values.
Overrides KeyTypeMultivalueInterface::serialize
File
- tests/
modules/ key_test/ src/ Plugin/ KeyType/ MultiValueKeyType.php, line 61
Class
- MultiValueKeyType
- Defines a key type that is multi-value.
Namespace
Drupal\key_test\Plugin\KeyTypeCode
public function serialize(array $array) {
return json_encode($array);
}