Functions - 11.x - drupal

Primary tabs

Title Deprecated File name Summary Direct uses Strings
hook_field_widget_single_element_WIDGET_TYPE_form_alter core/modules/field/field.api.php Alter widget forms for a specific widget provided by another module.
hook_field_widget_third_party_settings_form core/modules/field_ui/field_ui.api.php Allow modules to add settings to field widgets provided by other modules.
hook_filetransfer_info core/lib/Drupal/Core/File/file.api.php Register information about FileTransfer classes provided by a module.
hook_filetransfer_info_alter core/lib/Drupal/Core/File/file.api.php Alter the FileTransfer class registry.
hook_file_copy core/modules/file/file.api.php Respond to a file that has been copied.
hook_file_download core/lib/Drupal/Core/File/file.api.php Control access to private file downloads and specify HTTP headers.
hook_file_mimetype_mapping_alter core/lib/Drupal/Core/File/file.api.php Alter MIME type mappings used to determine MIME type from a file extension.
hook_file_move core/modules/file/file.api.php Respond to a file that has been moved.
hook_file_url_alter core/lib/Drupal/Core/File/file.api.php Alter the URL to a file.
hook_filter_format_disable core/modules/filter/filter.api.php Perform actions when a text format has been disabled.
hook_filter_info_alter core/modules/filter/filter.api.php Perform alterations on filter definitions.
hook_filter_secure_image_alter core/modules/filter/filter.api.php Alters images with an invalid source.
hook_form_alter core/lib/Drupal/Core/Form/form.api.php Perform alterations before a form is rendered.
hook_form_BASE_FORM_ID_alter core/lib/Drupal/Core/Form/form.api.php Provide a form-specific alteration for shared ('base') forms.
hook_form_FORM_ID_alter core/lib/Drupal/Core/Form/form.api.php Provide a form-specific alteration instead of the global hook_form_alter().
hook_form_system_theme_settings_alter core/lib/Drupal/Core/Render/theme.api.php Allow themes to alter the theme-specific settings form.
hook_help core/modules/help/help.api.php Provide online user help.
hook_help_section_info_alter core/modules/help/help.api.php Perform alterations on help page section plugin definitions.
hook_help_topics_info_alter core/modules/help/help.api.php Perform alterations on help topic definitions.
hook_hook_info core/lib/Drupal/Core/Extension/module.api.php Defines one or more hooks that are exposed by a module.
hook_image_effect_info_alter core/modules/image/image.api.php Alter the information provided in \Drupal\image\Annotation\ImageEffect.
hook_image_style_flush core/modules/image/image.api.php Respond to image style flushing.
hook_install core/lib/Drupal/Core/Extension/module.api.php Perform setup tasks when the module is installed.
hook_install_tasks core/lib/Drupal/Core/Extension/module.api.php Return an array of tasks to be performed by an installation profile.
hook_install_tasks_alter core/lib/Drupal/Core/Extension/module.api.php Alter the full list of installation tasks.
hook_jsonapi_entity_field_filter_access core/modules/jsonapi/jsonapi.api.php Restricts filtering access to the given field.
hook_jsonapi_entity_filter_access core/modules/jsonapi/jsonapi.api.php Controls access when filtering by entity data via JSON:API.
hook_jsonapi_ENTITY_TYPE_filter_access core/modules/jsonapi/jsonapi.api.php Controls access to filtering by entity data via JSON:API.
hook_js_alter core/lib/Drupal/Core/Render/theme.api.php Alters JavaScript before it is presented on the page.
hook_js_settings_alter core/lib/Drupal/Core/Render/theme.api.php Perform necessary alterations to the JavaScript settings (drupalSettings).
hook_js_settings_build core/lib/Drupal/Core/Render/theme.api.php Modify the JavaScript settings (drupalSettings).
hook_language_fallback_candidates_alter core/modules/language/language.api.php Allow modules to alter the language fallback candidates.
hook_language_fallback_candidates_OPERATION_alter core/modules/language/language.api.php Allow modules to alter the fallback candidates for specific operations.
hook_language_negotiation_info_alter core/modules/language/language.api.php Perform alterations on language negotiation methods.
hook_language_switch_links_alter core/lib/Drupal/Core/Language/language.api.php Perform alterations on language switcher links.
hook_language_types_info core/modules/language/language.api.php Define language types.
hook_language_types_info_alter core/modules/language/language.api.php Perform alterations on language types.
hook_layout_alter core/core.api.php Allow modules to alter layout plugin definitions.
hook_library_info_alter core/lib/Drupal/Core/Render/theme.api.php Alter libraries provided by an extension.
hook_library_info_build core/lib/Drupal/Core/Render/theme.api.php Add dynamic library definitions.
hook_link_alter core/lib/Drupal/Core/Utility/link.api.php Alter the parameters for links.
hook_locale_translation_projects_alter core/modules/locale/locale.api.php Alter the list of projects to be updated by locale's interface translation.
hook_local_tasks_alter core/lib/Drupal/Core/Menu/menu.api.php Alter local tasks plugins.
hook_mail core/core.api.php Prepares a message based on parameters.
hook_mail_alter core/core.api.php Alter an email message created with MailManagerInterface->mail().
hook_mail_backend_info_alter core/core.api.php Alter the list of mail backend plugin definitions.
hook_media_source_info_alter core/modules/media/media.api.php Alters the information provided in \Drupal\media\Annotation\MediaSource.
hook_menu_links_discovered_alter core/lib/Drupal/Core/Menu/menu.api.php Alters all the menu links discovered by the menu link plugin manager.
hook_menu_local_actions_alter core/lib/Drupal/Core/Menu/menu.api.php Alter local actions plugins.
hook_menu_local_tasks_alter core/lib/Drupal/Core/Menu/menu.api.php Alter local tasks displayed on the page before they are rendered.

Other projects


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