summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/file/file.views.inc
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/file/file.views.inc')
-rw-r--r--core/modules/file/file.views.inc24
1 files changed, 12 insertions, 12 deletions
diff --git a/core/modules/file/file.views.inc b/core/modules/file/file.views.inc
index 7fb54b61362..8e45101bd84 100644
--- a/core/modules/file/file.views.inc
+++ b/core/modules/file/file.views.inc
@@ -19,13 +19,13 @@ function file_field_views_data(FieldStorageConfigInterface $field_storage) {
$data = views_field_default_views_data($field_storage);
foreach ($data as $table_name => $table_data) {
// Add the relationship only on the fid field.
- $data[$table_name][$field_storage->getName() . '_target_id']['relationship'] = array(
+ $data[$table_name][$field_storage->getName() . '_target_id']['relationship'] = [
'id' => 'standard',
'base' => 'file_managed',
'entity type' => 'file',
'base field' => 'fid',
- 'label' => t('file from @field_name', array('@field_name' => $field_storage->getName())),
- );
+ 'label' => t('file from @field_name', ['@field_name' => $field_storage->getName()]),
+ ];
}
return $data;
@@ -47,11 +47,11 @@ function file_field_views_data_views_data_alter(array &$data, FieldStorageConfig
list($label) = views_entity_field_label($entity_type_id, $field_name);
- $data['file_managed'][$pseudo_field_name]['relationship'] = array(
- 'title' => t('@entity using @field', array('@entity' => $entity_type->getLabel(), '@field' => $label)),
- 'label' => t('@field_name', array('@field_name' => $field_name)),
+ $data['file_managed'][$pseudo_field_name]['relationship'] = [
+ 'title' => t('@entity using @field', ['@entity' => $entity_type->getLabel(), '@field' => $label]),
+ 'label' => t('@field_name', ['@field_name' => $field_name]),
'group' => $entity_type->getLabel(),
- 'help' => t('Relate each @entity with a @field set to the file.', array('@entity' => $entity_type->getLabel(), '@field' => $label)),
+ 'help' => t('Relate each @entity with a @field set to the file.', ['@entity' => $entity_type->getLabel(), '@field' => $label]),
'id' => 'entity_reverse',
'base' => $entity_type->getDataTable() ?: $entity_type->getBaseTable(),
'entity_type' => $entity_type_id,
@@ -59,12 +59,12 @@ function file_field_views_data_views_data_alter(array &$data, FieldStorageConfig
'field_name' => $field_name,
'field table' => $table_mapping->getDedicatedDataTableName($field_storage),
'field field' => $field_name . '_target_id',
- 'join_extra' => array(
- 0 => array(
+ 'join_extra' => [
+ 0 => [
'field' => 'deleted',
'value' => 0,
'numeric' => TRUE,
- ),
- ),
- );
+ ],
+ ],
+ ];
}