Functions - 8.9.x - drupal

Primary tabs

Title Deprecated File name Summary Direct uses Strings
drupal_phpunit_find_extension_directories core/tests/bootstrap.php Finds all valid extension directories recursively within a given directory. 2
drupal_phpunit_get_extension_namespaces core/tests/bootstrap.php Registers the namespace for each extension directory with the autoloader. 1
drupal_phpunit_populate_class_loader core/tests/bootstrap.php Populate class loader with additional namespaces for tests. 1
drupal_placeholder

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Component\Render\FormattableMarkup or Twig's "placeholder" filter instead. Note this method should not be used to simply emphasize a string and therefore has few valid use-cases. Note also, that this method does not mark the string as safe.

core/includes/bootstrap.inc Formats text for emphasized display in a placeholder inside a sentence.
drupal_pre_render_link

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Render\Element\Link::preRenderLink().

core/includes/common.inc Pre-render callback: Renders a link into #markup.
drupal_pre_render_links

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Render\Element\Link::preRenderLinks() instead.

core/includes/common.inc Pre-render callback: Collects child links into a single array. 1
drupal_process_states

in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Form\FormHelper::processStates() instead.

core/includes/common.inc Adds JavaScript to change the state of an element based on another element. 1
drupal_realpath

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\File\FileSystem::realpath().

core/includes/file.inc Resolves the absolute filepath of a local URI or filepath. 1
drupal_rebuild core/includes/utility.inc Rebuilds all caches even when Drupal itself does not work. 1
drupal_register_shutdown_function core/includes/bootstrap.inc Registers a function for execution on shutdown. 12 1
drupal_render

in drupal:8.0.0 and is removed from drupal:9.0.0. Use the 'renderer' service instead.

core/includes/common.inc Renders HTML given a structured array tree.
drupal_render_children

in drupal:8.0.0 and is removed from drupal:9.0.0. Avoid early rendering when possible or loop through the elements and render them as they are available.

core/includes/common.inc Renders children of an element and concatenates them.
drupal_render_root

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Render\RendererInterface::renderRoot() instead.

core/includes/common.inc Renders final HTML given a structured array tree. 1
drupal_required_modules core/includes/module.inc Returns an array of modules required by core. 1
drupal_requirements_severity core/includes/install.inc Extracts the highest severity from the requirements array. 3
drupal_requirements_url core/includes/install.inc Returns a URL for proceeding to the next page after a requirements problem. 1
drupal_rewrite_settings core/includes/install.inc Replaces values in settings.php with values in the submitted array. 9
drupal_rmdir

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\File\FileSystem::rmdir().

core/includes/file.inc Removes a directory. 1
drupal_schema_get_field_value

in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::castValue() instead.

core/includes/schema.inc Typecasts values to proper data types. 1
drupal_set_installed_schema_version core/includes/schema.inc Updates the installed version information for a module. 12
drupal_set_message

in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.

core/includes/bootstrap.inc Sets a message to display to the user. 1
drupal_set_time_limit

in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal\Component\Utility\Environment::setTimeLimit() instead.

core/includes/common.inc Attempts to set the PHP maximum execution time. 1
drupal_static core/includes/bootstrap.inc Provides central static variable storage. 38
drupal_static_reset core/includes/bootstrap.inc Resets one or all centrally stored static variable(s). 29 1
drupal_tempnam

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\File\FileSystem::tempnam().

core/includes/file.inc Creates a file with a unique filename in the specified directory. 1
drupal_theme_rebuild core/includes/theme.inc Forces the system to rebuild the theme registry. 7
drupal_uninstall_schema core/includes/schema.inc Removes all tables defined in a module's hook_schema(). 1
drupal_unlink

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\File\FileSystem::unlink().

core/includes/file.inc Deletes a file. 1
drupal_validate_utf8

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Component\Utility\Unicode::validateUtf8().

core/includes/bootstrap.inc Checks whether a string is valid UTF-8.
drupal_valid_test_ua core/includes/bootstrap.inc Returns the test prefix if this is an internal request from SimpleTest. 19 1
drupal_verify_install_file core/includes/install.inc Verifies the state of the specified file. 6
drupal_verify_profile core/includes/install.inc Verifies that all dependencies are met for a given installation profile. 2
drupal_xml_parser_create

in drupal:8.3.0 and is removed from drupal:9.0.0. Use xml_parser_create() and xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING, 'utf-8') instead.

core/includes/unicode.inc Prepares a new XML parser.
dynamic_page_cache_help core/modules/dynamic_page_cache/dynamic_page_cache.module Implements hook_help().
editor_element_info_alter core/modules/editor/editor.module Implements hook_element_info_alter().
editor_entity_delete core/modules/editor/editor.module Implements hook_entity_delete().
editor_entity_insert core/modules/editor/editor.module Implements hook_entity_insert().
editor_entity_revision_delete core/modules/editor/editor.module Implements hook_entity_revision_delete().
editor_entity_update core/modules/editor/editor.module Implements hook_entity_update().
editor_field_formatter_info_alter core/modules/editor/editor.module Implements hook_field_formatter_info_alter().
editor_file_download core/modules/editor/editor.module Implements hook_file_download().
editor_filter_format_presave core/modules/editor/editor.module Implements hook_ENTITY_TYPE_presave().
editor_filter_xss core/modules/editor/editor.module Applies text editor XSS filtering. 2
editor_form_filter_admin_format_editor_configure core/modules/editor/editor.module Button submit handler for filter_format_form()'s 'editor_configure' button. 1
editor_form_filter_admin_format_submit core/modules/editor/editor.module Additional submit handler for filter_format_form(). 1
editor_form_filter_admin_format_validate core/modules/editor/editor.module Additional validate handler for filter_format_form(). 1
editor_form_filter_admin_form_ajax core/modules/editor/editor.module AJAX callback handler for filter_format_form(). 1
editor_form_filter_admin_overview_alter core/modules/editor/editor.module Implements hook_form_FORM_ID_alter().
editor_form_filter_format_form_alter core/modules/editor/editor.module Implements hook_form_BASE_FORM_ID_alter() for \Drupal\filter\FilterFormatEditForm.
editor_help core/modules/editor/editor.module Implements hook_help().

Other projects


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