_batch_shutdown

_batch_shutdown() Shutdown function: Stores the current batch data for the next request. See also _batch_page() drupal_register_shutdown_function() File core/includes/batch.inc, line 515 Batch processing API for processes to run in multiple HTTP requests. Code function _batch_shutdown() { if ($batch = batch_get()) { \Drupal::service('batch.storage')->update($batch); } }

_ckeditor_theme_css

_ckeditor_theme_css($theme = NULL) Retrieves the default theme's CKEditor stylesheets. Themes may specify iframe-specific CSS files for use with CKEditor by including a "ckeditor_stylesheets" key in their .info.yml file. ckeditor_stylesheets: - css/ckeditor-iframe.css File core/modules/ckeditor/ckeditor.module, line 81 Provides integration with the CKEditor WYSIWYG editor. Code function _ckeditor_theme_css($theme = NULL) { $css = array(); if (!isset($theme)) { $theme = \Drupal::con

_color_blend

_color_blend($img, $hex1, $hex2, $alpha) Blends two hex colors and returns the GD color. File core/modules/color/color.module, line 739 Allows users to change the color scheme of themes. Code function _color_blend($img, $hex1, $hex2, $alpha) { $in1 = _color_unpack($hex1); $in2 = _color_unpack($hex2); $out = array($img); for ($i = 0; $i < 3; ++$i) { $out[] = $in1[$i] + ($in2[$i] - $in1[$i]) * $alpha; } return call_user_func_array('imagecolorallocate', $out); }

_color_gd

_color_gd($img, $hex) Converts a hex triplet into a GD color. File core/modules/color/color.module, line 731 Allows users to change the color scheme of themes. Code function _color_gd($img, $hex) { $c = array_merge(array($img), _color_unpack($hex)); return call_user_func_array('imagecolorallocate', $c); }

_color_hsl2rgb

_color_hsl2rgb($hsl) Converts an HSL triplet into RGB. File core/modules/color/color.module, line 780 Allows users to change the color scheme of themes. Code function _color_hsl2rgb($hsl) { $h = $hsl[0]; $s = $hsl[1]; $l = $hsl[2]; $m2 = ($l <= 0.5) ? $l * ($s + 1) : $l + $s - $l * $s; $m1 = $l * 2 - $m2; return array( _color_hue2rgb($m1, $m2, $h + 0.33333), _color_hue2rgb($m1, $m2, $h), _color_hue2rgb($m1, $m2, $h - 0.33333), ); }

_color_hue2rgb

_color_hue2rgb($m1, $m2, $h) Helper function for _color_hsl2rgb(). File core/modules/color/color.module, line 797 Allows users to change the color scheme of themes. Code function _color_hue2rgb($m1, $m2, $h) { $h = ($h < 0) ? $h + 1 : (($h > 1) ? $h - 1 : $h); if ($h * 6 < 1) { return $m1 + ($m2 - $m1) * $h * 6; } if ($h * 2 < 1) { return $m2; } if ($h * 3 < 2) { return $m1 + ($m2 - $m1) * (0.66666 - $h) * 6; } return $m1; }

_color_pack

_color_pack($rgb, $normalize = FALSE) Converts an RGB triplet to a hex color. File core/modules/color/color.module, line 768 Allows users to change the color scheme of themes. Code function _color_pack($rgb, $normalize = FALSE) { $out = 0; foreach ($rgb as $k => $v) { $out |= (($v * ($normalize ? 255 : 1)) << (16 - $k * 8)); } return '#' . str_pad(dechex($out), 6, 0, STR_PAD_LEFT); }

_color_render_images

_color_render_images($theme, &$info, &$paths, $palette) Renders images that match a given palette. File core/modules/color/color.module, line 593 Allows users to change the color scheme of themes. Code function _color_render_images($theme, &$info, &$paths, $palette) { // Prepare template image. $source = $paths['source'] . '/' . $info['base_image']; $source = imagecreatefrompng($source); $width = imagesx($source); $height = imagesy($source); // Prepare target buff

_color_rewrite_stylesheet

_color_rewrite_stylesheet($theme, &$info, &$paths, $palette, $style) Rewrites the stylesheet to match the colors in the palette. File core/modules/color/color.module, line 512 Allows users to change the color scheme of themes. Code function _color_rewrite_stylesheet($theme, &$info, &$paths, $palette, $style) { // Prepare color conversion table. $conversion = $palette; foreach ($conversion as $k => $v) { $conversion[$k] = Unicode::strtolower($v); } $default = c

_color_rgb2hsl

_color_rgb2hsl($rgb) Converts an RGB triplet to HSL. File core/modules/color/color.module, line 809 Allows users to change the color scheme of themes. Code function _color_rgb2hsl($rgb) { $r = $rgb[0]; $g = $rgb[1]; $b = $rgb[2]; $min = min($r, min($g, $b)); $max = max($r, max($g, $b)); $delta = $max - $min; $l = ($min + $max) / 2; $s = 0; if ($l > 0 && $l < 1) { $s = $delta / ($l < 0.5 ? (2 * $l) : (2 - 2 * $l)); } $h = 0; if ($delta > 0) {