function field_encrypt_test_entity_base_field_info_alter in Field Encryption 3.0.x
Implements hook_entity_base_field_info_alter().
File
- tests/
modules/ field_encrypt_test/ field_encrypt_test.module, line 78 - Contains module hooks for field_encrypt_test.
Code
function field_encrypt_test_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) {
if ($entity_type
->id() === 'node' && \Drupal::state()
->get('field_encrypt_test.hook_field_encrypt_unencrypted_storage_value_alter', FALSE)) {
/** @var BaseFieldDefinition[] $fields */
$fields['title']
->setSetting('field_encrypt.placeholders', [
'value' => '🐒',
]);
}
}