Functions - 9.5.x - drupal

Primary tabs

Title Deprecated File name Summary Direct uses Strings
file_managed_file_save_upload core/modules/file/file.module Saves any files that have been uploaded into a managed_file element. 1
file_managed_file_submit core/modules/file/file.module Form submission handler for upload / remove buttons of managed_file elements. 2
file_move

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\file\FileRepositoryInterface::move() instead.

core/modules/file/file.module Moves a file to a new location and update the file's database entry. 1
file_munge_filename

in drupal:9.2.0 and is removed from drupal:10.0.0. Dispatch a \Drupal\Core\File\Event\FileUploadSanitizeNameEvent event instead.

core/includes/file.inc Modifies a filename as needed for security purposes. 6
file_post_update_add_txt_if_allows_insecure_extensions core/modules/file/file.post_update.php Add txt to allowed extensions for all fields that allow uploads of insecure files.
file_progress_implementation core/modules/file/file.module Determines the preferred upload progress implementation. 4
file_requirements core/modules/file/file.install Implements hook_requirements().
file_save_data

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\file\FileRepositoryInterface::writeData() instead.

core/modules/file/file.module Saves a file to the specified destination and creates a database entry. 1
file_save_upload core/modules/file/file.module Saves file uploads to a new location. 6
file_schema core/modules/file/file.install Implements hook_schema().
file_test_entity_type_alter core/modules/file/tests/file_test/file_test.module Implements hook_entity_info_alter().
file_test_file_copy core/modules/file/tests/file_test/file_test.module Implements hook_file_copy().
file_test_file_download core/modules/file/tests/file_test/file_test.module Implements hook_file_download().
file_test_file_insert core/modules/file/tests/file_test/file_test.module Implements hook_ENTITY_TYPE_insert() for file entities.
file_test_file_load core/modules/file/tests/file_test/file_test.module Implements hook_ENTITY_TYPE_load() for file entities.
file_test_file_mimetype_mapping_alter core/modules/file/tests/file_test/file_test.module Implements hook_file_mimetype_mapping_alter().
file_test_file_move core/modules/file/tests/file_test/file_test.module Implements hook_file_move().
file_test_file_predelete core/modules/file/tests/file_test/file_test.module Implements hook_ENTITY_TYPE_predelete() for file entities.
file_test_file_scan_callback core/modules/file/tests/file_test/file_test.module Helper function for testing FileSystemInterface::scanDirectory(). 2 1
file_test_file_scan_callback_reset core/modules/file/tests/file_test/file_test.module Reset static variables used by file_test_file_scan_callback(). 1
file_test_file_update core/modules/file/tests/file_test/file_test.module Implements hook_ENTITY_TYPE_update() for file entities.
file_test_file_url_alter core/modules/file/tests/file_test/file_test.module Implements hook_file_url_alter().
file_test_file_validate core/modules/file/tests/file_test/file_test.module Implements hook_file_validate().
file_test_get_all_calls core/modules/file/tests/file_test/file_test.module Get an array with the calls for all hooks. 2
file_test_get_calls core/modules/file/tests/file_test/file_test.module Gets the arguments passed to a given hook invocation. 2
file_test_reset core/modules/file/tests/file_test/file_test.module Reset/initialize the history of calls to the file_* hooks. 22
file_test_set_return core/modules/file/tests/file_test/file_test.module Assign a return value for a given operation. 3
file_test_validator core/modules/file/tests/file_test/file_test.module Helper validator that returns the $errors parameter.
file_theme core/modules/file/file.module Implements hook_theme().
file_tokens core/modules/file/file.module Implements hook_tokens().
file_token_info core/modules/file/file.module Implements hook_token_info().
file_unmunge_filename

in drupal:9.2.0 and is removed from drupal:10.0.0. Use str_replace() instead.

core/includes/file.inc Undoes the effect of file_munge_filename(). 1
file_update_last_removed core/modules/file/file.install Implements hook_update_last_removed().
file_url_transform_relative

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\File\FileUrlGenerator::transformRelative() instead.

core/includes/file.inc Transforms an absolute URL of a local file to a relative URL. 1
file_validate core/modules/file/file.module Checks that a file meets the criteria specified by the validators. 10
file_validate_extensions core/modules/file/file.module Checks that the filename ends with an allowed extension. 2
file_validate_image_resolution core/modules/file/file.module Verifies that image dimensions are within the specified maximum and minimum. 1
file_validate_is_image core/modules/file/file.module Checks that the file is recognized as a valid image. 1
file_validate_name_length core/modules/file/file.module Checks for files with names longer than can be stored in the database. 1
file_validate_size core/modules/file/file.module Checks that the file's size is below certain limits. 1
filter_default_format core/modules/filter/filter.module Returns the ID of the default text format for a particular user. 25 1
filter_fallback_format core/modules/filter/filter.module Returns the ID of the fallback text format that all users have access to. 7 1
filter_filter_secure_image_alter core/modules/filter/filter.module Implements hook_filter_secure_image_alter().
filter_formats core/modules/filter/filter.module Retrieves a list of enabled text formats, ordered by weight. 18 4
filter_formats_reset core/modules/filter/filter.module Resets the text format caches. 7
filter_get_formats_by_role core/modules/filter/filter.module Retrieves a list of text formats that are allowed for a given role. 1
filter_get_roles_by_format core/modules/filter/filter.module Retrieves a list of roles that are allowed to use a given text format. 7
filter_help core/modules/filter/filter.module Implements hook_help().
filter_test_filter_format_disable core/modules/filter/tests/filter_test/filter_test.module Implements hook_filter_format_disable().
filter_test_filter_format_insert core/modules/filter/tests/filter_test/filter_test.module Implements hook_ENTITY_TYPE_insert().

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.