2 * Implements hook_options_list_alter().
4 function {{ machine_name }}_options_list_alter(array &$options, array $context) {
5 // Check if this is the field we want to change.
6 if ($context['fieldDefinition']->id() == 'field_option') {
7 // Change the label of the empty option.
8 $options['_none'] = t('== Empty ==');