_locale_strip_quotes

_locale_strip_quotes($string) Removes the quotes and string concatenations from the string. Parameters string $string: Single or double quoted strings, optionally concatenated by plus (+) sign. Return value string String with leading and trailing quotes removed. File core/modules/locale/locale.module, line 1116 Enables the translation of the user interface to languages other than English. Code function _locale_strip_quotes($string) { return implode('', preg_split('~(?<!\\\\)[\'"]\s*\+\

_locale_rebuild_js

_locale_rebuild_js($langcode = NULL) (Re-)Creates the JavaScript translation file for a language. Parameters $langcode: The language, the translation file should be (re)created for. Return value bool TRUE if translation file exists, FALSE otherwise. File core/modules/locale/locale.module, line 1265 Enables the translation of the user interface to languages other than English. Code function _locale_rebuild_js($langcode = NULL) { $config = \Drupal::config('locale.settings'); if (!isset($l

_locale_refresh_translations

_locale_refresh_translations($langcodes, $lids = array()) Refresh related information after string translations have been updated. The information that will be refreshed includes: JavaScript translations. Locale cache. Render cache. Parameters array $langcodes: Language codes for updated translations. array $lids: (optional) List of string identifiers that have been updated / created. If not provided, all caches for the affected languages are cleared. File core/modules/locale/locale.module,

_locale_parse_js_file

_locale_parse_js_file($filepath) Parses a JavaScript file, extracts strings wrapped in Drupal.t() and Drupal.formatPlural() and inserts them into the database. Parameters string $filepath: File name to parse. Return value array Array of string objects to update indexed by context and source. Throws Exception If a non-local file is attempted to be parsed. File core/modules/locale/locale.module, line 1133 Enables the translation of the user interface to languages other than English. Code fun

_filter_url_parse_partial_links

_filter_url_parse_partial_links($match) Makes links out of domain names starting with "www." Callback for preg_replace_callback() within _filter_url(). Related topics Standard filters Filters implemented by the Filter module. File core/modules/filter/filter.module, line 622 Framework for handling the filtering of content. Code function _filter_url_parse_partial_links($match) { // The $i:th parenthesis in the regexp contains the URL. $i = 1; $match[$i] = Html::decodeEntities($match[$i

_filter_url_trim

_filter_url_trim($text, $length = NULL) Shortens long URLs to http://www.example.com/long/url… Related topics Standard filters Filters implemented by the Filter module. File core/modules/filter/filter.module, line 675 Framework for handling the filtering of content. Code function _filter_url_trim($text, $length = NULL) { static $_length; if ($length !== NULL) { $_length = $length; } if (isset($_length)) { $text = Unicode::truncate($text, $_length, FALSE, TRUE); } retur

_install_get_version_info

_install_get_version_info($version) Extracts version information from a drupal core version string. Parameters string $version: Version info string (e.g., 8.0.0, 8.1.0, 8.0.0-dev, 8.0.0-unstable1, 8.0.0-alpha2, 8.0.0-beta3, and 8.0.0-rc4). Return value array Associative array of version info: major: Major version (e.g., "8"). minor: Minor version (e.g., "0"). patch: Patch version (e.g., "0"). extra: Extra version info (e.g., "alpha2"). extra_text: The text part of "extra" (e.g., "alpha")

_install_select_profile

_install_select_profile(&$install_state) Determines the installation profile to use in the installer. A profile will be selected in the following order of conditions: Only one profile is available. A specific profile name is requested in installation parameters: For interactive installations via request query parameters. For non-interactive installations via install_drupal() settings. A discovered profile that is a distribution. If multiple profiles are distributions, then the first discov

_install_module_batch

_install_module_batch($module, $module_name, &$context) Implements callback_batch_operation(). Performs batch installation of modules. File core/includes/install.core.inc, line 1782 API functions for installing Drupal. Code function _install_module_batch($module, $module_name, &$context) { \Drupal::service('module_installer')->install(array($module), FALSE); $context['results'][] = $module; $context['message'] = t('Installed %module module.', array('%module' => $module_nam

_install_prepare_import

_install_prepare_import($langcodes, $server_pattern) Tells the translation import process that Drupal core is installed. Parameters array $langcodes: Language codes used for the translations. string $server_pattern: Server access pattern (to replace language code, version number, etc. in). File core/includes/install.core.inc, line 1667 API functions for installing Drupal. Code function _install_prepare_import($langcodes, $server_pattern) { \Drupal::moduleHandler()->loadInclude('locale',