public static Color::preRenderColor($element)
Prepares a #type 'color' render element for input.html.twig.
Parameters
array $element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #attributes.
Return value
array The $element with prepared variables ready for input.html.twig.
File
- core/lib/Drupal/Core/Render/Element/Color.php, line 81
Class
- Color
- Provides a form element for choosing a color.
Namespace
Drupal\Core\Render\Element
Code
public static function preRenderColor($element) { $element['#attributes']['type'] = 'color'; Element::setAttributes($element, array('id', 'name', 'value')); static::setAttributes($element, array('form-color')); return $element; }
Please login to continue.