diff -u b/core/modules/views/views.api.php b/core/modules/views/views.api.php --- b/core/modules/views/views.api.php +++ b/core/modules/views/views.api.php @@ -140,7 +140,7 @@ // timestamp_field INT(8) COMMENT 'Just a timestamp field.', // PRIMARY KEY(nid) // ); - // + // First, the entry $data['example_table']['table'] describes properties of // the actual table – not its content. @@ -336,11 +336,11 @@ * field_views_field_default_views_data(). * * @param \Drupal\field\FieldInterface $field - * A field definition. + * The field definition. * * @return array * An array of views data, in the same format as the return value of - * hook_views_data(). + * hook_views_data(). * * @see field_views_data() * @see hook_field_views_data_alter() @@ -362,23 +362,24 @@ } /** - * Alter the views data for a single Field API field. + * Alter the Views data for a single Field API field. * - * This is called even if there is no hook_field_views_data() implementation for - * the field, and therefore may be used to alter the default data that - * field_views_field_default_views_data() supplies for the field. + * This is called on all modules even if there is no hook_field_views_data() + * implementation for the field, and therefore may be used to alter the + * default data that field_views_field_default_views_data() supplies for the + * field. * - * @param array $result - * An array of views table data provided for a single field. This has the same - * format as the return value of hook_views_data(). + * @param array $data + * An array of views table data provided for a single field. This has the same + * format as the return value of hook_views_data(). * @param \Drupal\field\FieldConfigInterface $field - * A field config entity. + * The field config entity. * * @see field_views_data() * @see hook_field_views_data() * @see hook_field_views_data_views_data_alter() */ -function hook_field_views_data_alter(array &$result, \Drupal\field\FieldConfigInterface $field) { +function hook_field_views_data_alter(array &$data, \Drupal\field\FieldConfigInterface $field) { $entity_type_id = $field->entity_type; $field_name = $field->getName(); $entity_type = \Drupal::entityManager()->getDefinition($entity_type_id); @@ -408,7 +409,7 @@ } /** - * Alter the views data on a per field basis. + * Alter the Views data on a per field basis. * * The field module's implementation of hook_views_data_alter() invokes this for * each field, in the module that defines the field type (as declared in the