summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorquietone <quietone@2572884.no-reply.drupal.org>2025-02-14 12:34:11 +1300
committerquietone <quietone@2572884.no-reply.drupal.org>2025-02-14 12:34:11 +1300
commit5221f2e02fb6d860c494a16df7a638abb1564914 (patch)
treec8873f74f3fe87ea08ae4f2446e0d9a7600bd2a2
parentc7ebe845022c12671422ed014e2d00826e97a2ed (diff)
downloaddrupal-5221f2e02fb6d860c494a16df7a638abb1564914.tar.gz
drupal-5221f2e02fb6d860c494a16df7a638abb1564914.zip
Issue #3504660 by alvar0hurtad0, daniel_mm02, nicxvan, smustgrave: Incorrect 'label' in hook_views_data example
-rw-r--r--core/modules/views/views.api.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/modules/views/views.api.php b/core/modules/views/views.api.php
index 169be475824..33c72113420 100644
--- a/core/modules/views/views.api.php
+++ b/core/modules/views/views.api.php
@@ -317,7 +317,7 @@ function hook_views_data(): array {
// ID of relationship handler plugin to use.
'id' => 'standard',
// Default label for relationship in the UI.
- 'label' => t('Example node'),
+ 'title' => t('Example node'),
// Description shown within the add relationship handler in the UI.
'help' => t('Relationship between the node and node field data'),
],
@@ -396,7 +396,7 @@ function hook_views_data(): array {
'id' => 'boolean',
// Override the generic field title, so that the filter uses a different
// label in the UI.
- 'label' => t('Published'),
+ 'title' => t('Published'),
// Override the default BooleanOperator filter handler's 'type' setting,
// to display this as a "Yes/No" filter instead of a "True/False" filter.
'type' => 'yes-no',
@@ -517,7 +517,7 @@ function hook_views_data_alter(array &$data) {
'field' => 'fid',
// ID of relationship handler plugin to use.
'id' => 'standard',
- 'label' => t('Default label for relationship'),
+ 'title' => t('Default label for relationship'),
// Description shown within the add relationship handler in the UI.
'help' => t('Description of the placeholder field relationship'),
],
@@ -557,7 +557,7 @@ function hook_field_views_data(FieldStorageConfigInterface $field_storage): arra
'id' => 'standard',
'base' => 'file_managed',
'base field' => 'target_id',
- 'label' => t('image from @field_name', ['@field_name' => $field_storage->getName()]),
+ 'title' => t('image from @field_name', ['@field_name' => $field_storage->getName()]),
];
}