drupal_get_destination

drupal_get_destination() Prepares a 'destination' URL query parameter. Used to direct the user back to the referring page after completing a form. By default the current URL is returned. If a destination exists in the previous request, that destination is returned. As such, a destination can persist across multiple pages. Return value array An associative array containing the key: destination: The value of the current request's 'destination' query parameter, if present. This can be either a r

drupal_get_database_types

drupal_get_database_types() Returns all supported database driver installer objects. Return value \Drupal\Core\Database\Install\Tasks[] An array of available database driver installer objects. File core/includes/install.inc, line 160 API functions for installing modules and themes. Code function drupal_get_database_types() { $databases = array(); $drivers = array(); // The internal database driver name is any valid PHP identifier. $mask = '/^' . DRUPAL_PHP_FUNCTION_PATTERN . '$/';

drupal_flush_all_caches

drupal_flush_all_caches() Flushes all persistent caches, resets all variables, and rebuilds all data structures. At times, it is necessary to re-initialize the entire system to account for changed or new code. This function: Clears all persistent caches: The bootstrap cache bin containing base system, module system, and theme system information. The common 'default' cache bin containing arbitrary caches. The page cache. The URL alias path cache. Resets all static variables that have been defin

drupal_find_theme_templates

drupal_find_theme_templates($cache, $extension, $path) Allows themes and/or theme engines to easily discover overridden templates. Parameters $cache: The existing cache of theme hooks to test against. $extension: The extension that these templates will have. $path: The path to search. File core/includes/theme.inc, line 193 The theme system, which controls the output of Drupal. Code function drupal_find_theme_templates($cache, $extension, $path) { $implementations = array(); // Collect p

drupal_find_theme_functions

drupal_find_theme_functions($cache, $prefixes) Allows themes and/or theme engines to discover overridden theme functions. Parameters array $cache: The existing cache of theme hooks to test against. array $prefixes: An array of prefixes to test, in reverse order of importance. Return value array The functions found, suitable for returning from hook_theme; File core/includes/theme.inc, line 135 The theme system, which controls the output of Drupal. Code function drupal_find_theme_functions($c

DRUPAL_EXTENSION_NAME_MAX_LENGTH

The maximum number of characters in a module or theme name. File core/includes/bootstrap.inc, line 76 Functions that need to be loaded on every Drupal request. Code const DRUPAL_EXTENSION_NAME_MAX_LENGTH = 50;

drupal_error_levels

drupal_error_levels() Maps PHP error constants to watchdog severity levels. The error constants are documented at http://php.net/manual/errorfunc.constants.php Related topics Logging severity levels Logging severity levels as defined in RFC 5424. File core/includes/errors.inc, line 23 Functions for error handling. Code function drupal_error_levels() { $types = array( E_ERROR => array('Error', RfcLogLevel::ERROR), E_WARNING => array('Warning', RfcLogLevel::WARNING), E_PAR

DRUPAL_DISABLED

Disabled option on forms and settings File core/modules/system/system.module, line 49 Configuration system that lets administrators modify the workings of the site. Code const DRUPAL_DISABLED = 0;

drupal_dirname

drupal_dirname($uri) Gets the name of the directory from a given path. Deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal\Core\File\FileSystem::dirname(). Related topics File interface Common file handling functions. File core/includes/file.inc, line 1137 API for handling file uploads and server file management. Code function drupal_dirname($uri) { return \Drupal::service('file_system')->dirname($uri); }

drupal_detect_database_types

drupal_detect_database_types() Detects all supported databases that are compiled into PHP. Return value An array of database types compiled into PHP. File core/includes/install.inc, line 144 API functions for installing modules and themes. Code function drupal_detect_database_types() { $databases = drupal_get_database_types(); foreach ($databases as $driver => $installer) { $databases[$driver] = $installer->name(); } return $databases; }