summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/file/file.module
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/file/file.module')
-rw-r--r--core/modules/file/file.module20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index a6332db90c77..1fa00345e651 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -1552,3 +1552,23 @@ function file_field_find_file_reference_column(FieldDefinitionInterface $field)
}
return FALSE;
}
+
+/**
+ * Implements hook_field_type_category_info().
+ */
+function file_field_type_category_info() {
+ return [
+ 'file_upload' => [
+ 'label' => t('File upload'),
+ 'description' => t('Field to upload any type of files.'),
+ 'weight' => -15,
+ ],
+ ];
+}
+
+/**
+ * Implements hook_preprocess_form_element__new_storage_type().
+ */
+function file_preprocess_form_element__new_storage_type(&$variables) {
+ $variables['#attached']['library'][] = 'file/drupal.file-icon';
+}