function Settings::processColorPicker

Same name and namespace in other branches
  1. 11.x core/themes/admin/src/Settings.php \Drupal\admin\Settings::processColorPicker()

Unset color picker fields.

Parameters

array $element: An associative array containing the properties and children of the element.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form element.

File

core/themes/admin/src/Settings.php, line 428

Class

Settings
Service to handle overridden user settings.

Namespace

Drupal\admin

Code

public static function processColorPicker(array $element, FormStateInterface $form_state) : array {
  $keys = $form_state->getCleanValueKeys();
  $form_state->setCleanValueKeys(array_merge($keys, $element['#parents']));
  return $element;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.