drupal_js_defaults

drupal_js_defaults($data = NULL) Constructs an array of the defaults that are used for JavaScript assets. Parameters $data: (optional) The default data parameter for the JavaScript asset array. See also hook_js_alter() File core/includes/common.inc, line 435 Common functions that many Drupal modules will need to reference. Code function drupal_js_defaults($data = NULL) { return array( 'type' => 'file', 'group' => JS_DEFAULT, 'weight' => 0, 'scope' => 'header',

drupal_install_system

drupal_install_system($install_state) Installs the system module. Separated from the installation of other modules so core system functions can be made available while other modules are installed. Parameters array $install_state: An array of information about the current installation state. This is used to set the default language. File core/includes/install.inc, line 608 API functions for installing modules and themes. Code function drupal_install_system($install_state) { // Remove the se

drupal_install_schema

drupal_install_schema($module) Creates all tables defined in a module's hook_schema(). Parameters string $module: The module for which the tables will be created. Related topics Schema API API to handle database schemas. File core/includes/schema.inc, line 117 Schema API handling functions. Code function drupal_install_schema($module) { $schema = drupal_get_module_schema($module); _drupal_schema_initialize($schema, $module, FALSE); foreach ($schema as $name => $table) { db_cr

drupal_install_profile_distribution_version

drupal_install_profile_distribution_version() Loads the installation profile, extracting its defined version. Return value string Distribution version defined in the profile's .info.yml file. Defaults to \Drupal::VERSION if no version is explicitly provided by the installation profile. See also install_profile_info() File core/includes/install.inc, line 123 API functions for installing modules and themes. Code function drupal_install_profile_distribution_version() { // During installation

drupal_install_profile_distribution_name

drupal_install_profile_distribution_name() Loads the installation profile, extracting its defined distribution name. Return value The distribution name defined in the profile's .info.yml file. Defaults to "Drupal" if none is explicitly provided by the installation profile. See also install_profile_info() File core/includes/install.inc, line 96 API functions for installing modules and themes. Code function drupal_install_profile_distribution_name() { // During installation, the profile inf

drupal_install_mkdir

drupal_install_mkdir($file, $mask, $message = TRUE) Creates a directory with the specified permissions. Parameters $file: The name of the directory to create; $mask: The permissions of the directory to create. $message: (optional) Whether to output messages. Defaults to TRUE. Return value TRUE/FALSE whether or not the directory was successfully created. File core/includes/install.inc, line 730 API functions for installing modules and themes. Code function drupal_install_mkdir($file, $mask,

drupal_install_fix_file

drupal_install_fix_file($file, $mask, $message = TRUE) Attempts to fix file permissions. The general approach here is that, because we do not know the security setup of the webserver, we apply our permission changes to all three digits of the file permission (i.e. user, group and all). To ensure that the values behave as expected (and numbers don't carry from one digit to the next) we do the calculation on the octal value using bitwise operations. This lets us remove, for example, 0222 from 070

drupal_install_config_directories

drupal_install_config_directories() Creates the config directory and ensures it is operational. See also install_settings_form_submit() update_prepare_d8_bootstrap() File core/includes/install.inc, line 484 API functions for installing modules and themes. Code function drupal_install_config_directories() { global $config_directories; // Add a randomized config directory name to settings.php, unless it was // manually defined in the existing already. if (empty($config_directories[CON

drupal_installation_attempted

drupal_installation_attempted() Returns TRUE if a Drupal installation is currently being attempted. File core/includes/bootstrap.inc, line 712 Functions that need to be loaded on every Drupal request. Code function drupal_installation_attempted() { // This cannot rely on the MAINTENANCE_MODE constant, since that would prevent // tests from using the non-interactive installer, in which case Drupal // only happens to be installed within the same request, but subsequently // executed cod

drupal_http_header_attributes

drupal_http_header_attributes(array $attributes = array()) Formats an attribute string for an HTTP header. Parameters $attributes: An associative array of attributes such as 'rel'. Return value A ; separated string ready for insertion in a HTTP header. No escaping is performed for HTML entities, so this string is not safe to be printed. File core/includes/common.inc, line 355 Common functions that many Drupal modules will need to reference. Code function drupal_http_header_attributes(array