CommandInterface

AJAX command interface. All AJAX commands passed to AjaxResponse objects should implement these methods. Hierarchy interface \Drupal\Core\Ajax\CommandInterface Related topics Ajax API Overview for Drupal's Ajax API. File core/lib/Drupal/Core/Ajax/CommandInterface.php, line 13 Namespace Drupal\Core\Ajax Members Name Modifiers Type Description CommandInterface::render public function Return an array to be run through json_encode and sent to the client.

Com::generate

public Com::generate() Generates a Universally Unique IDentifier (UUID). Return value A 16 byte integer represented as a hex string formatted with 4 hyphens. Overrides UuidInterface::generate File core/lib/Drupal/Component/Uuid/Com.php, line 14 Class Com Generates a UUID using the Windows internal GUID extension. Namespace Drupal\Component\Uuid Code public function generate() { // Remove {} wrapper and make lower case to keep result consistent. return strtolower(trim(com_create_gu

Com

Generates a UUID using the Windows internal GUID extension. Hierarchy class \Drupal\Component\Uuid\Com implements UuidInterface See also http://php.net/com_create_guid File core/lib/Drupal/Component/Uuid/Com.php, line 10 Namespace Drupal\Component\Uuid Members Name Modifiers Type Description Com::generate public function Generates a Universally Unique IDentifier (UUID). Overrides UuidInterface::generate

color_valid_hexadecimal_string

color_valid_hexadecimal_string($color) Determines if a hexadecimal CSS color string is valid. Parameters string $color: The string to check. Return value bool TRUE if the string is a valid hexadecimal CSS color string, or FALSE if it isn't. File core/modules/color/color.module, line 350 Allows users to change the color scheme of themes. Code function color_valid_hexadecimal_string($color) { return preg_match('/^#([a-f0-9]{3}){1,2}$/iD', $color); }

color_theme

color_theme() Implements hook_theme(). File core/modules/color/color.module, line 40 Allows users to change the color scheme of themes. Code function color_theme() { return array( 'color_scheme_form' => array( 'render element' => 'form', ), ); }

color_scheme_form_validate

color_scheme_form_validate($form, FormStateInterface $form_state) Form validation handler for color_scheme_form(). See also color_scheme_form_submit() File core/modules/color/color.module, line 359 Allows users to change the color scheme of themes. Code function color_scheme_form_validate($form, FormStateInterface $form_state) { // Only accept hexadecimal CSS color strings to avoid XSS upon use. foreach ($form_state->getValue('palette') as $key => $color) { if (!color_valid_hex

color_scheme_form_submit

color_scheme_form_submit($form, FormStateInterface $form_state) Form submission handler for color_scheme_form(). See also color_scheme_form_validate() File core/modules/color/color.module, line 373 Allows users to change the color scheme of themes. Code function color_scheme_form_submit($form, FormStateInterface $form_state) { // Avoid color settings spilling over to theme settings. $color_settings = array('theme', 'palette', 'scheme'); if ($form_state->hasValue('info')) { $col

color_scheme_form

color_scheme_form($complete_form, FormStateInterface $form_state, $theme) Form constructor for the color configuration form for a particular theme. Parameters $theme: The machine name of the theme whose color settings are being configured. See also color_scheme_form_validate() color_scheme_form_submit() File core/modules/color/color.module, line 200 Allows users to change the color scheme of themes. Code function color_scheme_form($complete_form, FormStateInterface $form_state, $theme) {

color_requirements

color_requirements($phase) Implements hook_requirements(). File core/modules/color/color.install, line 11 Install, update and uninstall functions for the color module. Code function color_requirements($phase) { $requirements = array(); if ($phase == 'runtime') { // Check for the PHP GD library. if (function_exists('imagegd2')) { $info = gd_info(); $requirements['color_gd'] = array( 'value' => $info['GD Version'], ); // Check for PNG support.

color_palette_color_value

color_palette_color_value($element, $input = FALSE, FormStateInterface $form_state) Determines the value for a palette color field. Parameters array $element: The form element whose value is being populated. string|bool $input: The incoming input to populate the form element. If this is FALSE, the element's default value should be returned. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value string The data that will appear in the $form_state->getV