drupal_get_user_timezone

drupal_get_user_timezone() Returns the time zone of the current user. File core/includes/bootstrap.inc, line 516 Functions that need to be loaded on every Drupal request. Code function drupal_get_user_timezone() { $user = \Drupal::currentUser(); $config = \Drupal::config('system.date'); if ($user && $config->get('timezone.user.configurable') && $user->isAuthenticated() && $user->getTimezone()) { return $user->getTimezone(); } else { // Ig

drupal_get_updaters

drupal_get_updaters() Assembles the Drupal Updater registry. An Updater is a class that knows how to update various parts of the Drupal file system, for example to update modules that have newer releases, or to install a new theme. Return value array The Drupal Updater class registry. See also \Drupal\Core\Updater\Updater hook_updater_info() hook_updater_info_alter() File core/includes/common.inc, line 1268 Common functions that many Drupal modules will need to reference. Code function drup

drupal_get_schema_versions

drupal_get_schema_versions($module) Returns an array of available schema versions for a module. Parameters string $module: A module name. Return value array|bool If the module has updates, an array of available updates sorted by version. Otherwise, FALSE. Related topics Schema API API to handle database schemas. File core/includes/schema.inc, line 28 Schema API handling functions. Code function drupal_get_schema_versions($module) { $updates = &drupal_static(__FUNCTION__, NULL); if

drupal_get_profile

drupal_get_profile() Gets the name of the currently active installation profile. When this function is called during Drupal's initial installation process, the name of the profile that's about to be installed is stored in the global installation state. At all other times, the "install_profile" setting will be available in settings.php. Return value string|null $profile The name of the installation profile or NULL if no installation profile is currently active. This is the case for example duri

drupal_get_path

drupal_get_path($type, $name) Returns the path to a system item (module, theme, etc.). Parameters $type: The type of the item; one of 'core', 'profile', 'module', 'theme', or 'theme_engine'. $name: The name of the item for which the path is requested. Ignored for $type 'core'. Return value The path to the requested item or an empty string if the item is not found. File core/includes/bootstrap.inc, line 258 Functions that need to be loaded on every Drupal request. Code function drupal_get_pa

drupal_get_module_schema

drupal_get_module_schema($module, $table = NULL) Returns a module's schema. This function can be used to retrieve a schema specification in hook_schema(), so it allows you to derive your tables from existing specifications. Parameters string $module: The module to which the table belongs. string $table: The name of the table. If not given, the module's complete schema is returned. Related topics Schema API API to handle database schemas. File core/includes/schema.inc, line 156 Schema API han

drupal_get_messages

drupal_get_messages($type = NULL, $clear_queue = TRUE) Returns all messages that have been set with drupal_set_message(). Parameters string $type: (optional) Limit the messages returned by type. Defaults to NULL, meaning all types. These values are supported: NULL 'status' 'warning' 'error' bool $clear_queue: (optional) If this is TRUE, the queue will be cleared of messages of the type specified in the $type parameter. Otherwise the queue will be left intact. Defaults to TRUE. Return value

drupal_get_installed_schema_version

drupal_get_installed_schema_version($module, $reset = FALSE, $array = FALSE) Returns the currently installed schema version for a module. Parameters string $module: A module name. bool $reset: Set to TRUE after installing or uninstalling an extension. bool $array: Set to TRUE if you want to get information about all modules in the system. Return value string|int The currently installed schema version, or SCHEMA_UNINSTALLED if the module is not installed. Related topics Schema API API to handl

drupal_get_filetransfer_info

drupal_get_filetransfer_info() Assembles the Drupal FileTransfer registry. Return value The Drupal FileTransfer class registry. See also \Drupal\Core\FileTransfer\FileTransfer hook_filetransfer_info() hook_filetransfer_info_alter() File core/includes/common.inc, line 1288 Common functions that many Drupal modules will need to reference. Code function drupal_get_filetransfer_info() { $info = &drupal_static(__FUNCTION__); if (!isset($info)) { $info = \Drupal::moduleHandler()->i

drupal_get_filename

drupal_get_filename($type, $name, $filename = NULL) Returns and optionally sets the filename for a system resource. The filename, whether provided, cached, or retrieved from the database, is only returned if the file exists. This function plays a key role in allowing Drupal's resources (modules and themes) to be located in different places depending on a site's configuration. For example, a module 'foo' may legally be located in any of these three places: core/modules/foo/foo.info.yml modules/f