Update to Drupal 8.2.2. For more information, see https://www.drupal.org/project/drupal/releases/8.2.2
This commit is contained in:
parent
23ffed3665
commit
507b45a0ed
378 changed files with 11434 additions and 5542 deletions
|
@ -20,7 +20,7 @@ use Drupal\Core\Field\FieldStorageDefinitionInterface;
|
|||
* properties.
|
||||
* @param array $context
|
||||
* An associative array containing:
|
||||
* - field_definition: The field definition
|
||||
* - fieldDefinition: The field definition
|
||||
* (\Drupal\Core\Field\FieldDefinitionInterface).
|
||||
* - entity: The entity object the field is attached to
|
||||
* (\Drupal\Core\Entity\EntityInterface).
|
||||
|
@ -30,7 +30,7 @@ use Drupal\Core\Field\FieldStorageDefinitionInterface;
|
|||
*/
|
||||
function hook_options_list_alter(array &$options, array $context) {
|
||||
// Check if this is the field we want to change.
|
||||
if ($context['field']->id() == 'field_option') {
|
||||
if ($context['fieldDefinition']->id() == 'field_option') {
|
||||
// Change the label of the empty option.
|
||||
$options['_none'] = t('== Empty ==');
|
||||
}
|
||||
|
|
Reference in a new issue