_comment_entity_uses_integer_id

_comment_entity_uses_integer_id($entity_type_id) Determines if an entity type is using an integer-based ID definition. Parameters string $entity_type_id: The ID the represents the entity type. Return value bool Returns TRUE if the entity type has an integer-based ID definition and FALSE otherwise. File core/modules/comment/comment.module, line 411 Enables users to comment on published content. Code function _comment_entity_uses_integer_id($entity_type_id) { $entity_type = \Drupal::entityM

_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_shift

_color_shift($given, $ref1, $ref2, $target) Shifts a given color, using a reference pair and a target blend color. Note: this function is significantly different from the JS version, as it is written to match the blended images perfectly. Constraint: if (ref2 == target + (ref1 - target) * delta) for some fraction delta then (return == target + (given - target) * delta). Loose constraint: Preserve relative positions in saturation and luminance space. File core/modules/color/color.module, line 68

_color_unpack

_color_unpack($hex, $normalize = FALSE) Converts a hex color into an RGB triplet. File core/modules/color/color.module, line 753 Allows users to change the color scheme of themes. Code function _color_unpack($hex, $normalize = FALSE) { if (strlen($hex) == 4) { $hex = $hex[1] . $hex[1] . $hex[2] . $hex[2] . $hex[3] . $hex[3]; } $c = hexdec($hex); for ($i = 16; $i >= 0; $i -= 8) { $out[] = (($c >> $i) & 0xFF) / ($normalize ? 255 : 1); } return $out; }

_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) {

_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_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); }

_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_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; }