You are here

function color_field_theme in Color Field 8.2

Same name and namespace in other branches
  1. 7.2 color_field.module \color_field_theme()
  2. 7 color_field.module \color_field_theme()

Implements hook_theme().

File

./color_field.module, line 48
A color field with a custom color picker using the Field Types API.

Code

function color_field_theme() {
  $theme = [];
  $theme['color_field_formatter_swatch'] = [
    'variables' => [
      'shape' => NULL,
      'color' => NULL,
      'width' => NULL,
      'height' => NULL,
      'attributes' => NULL,
    ],
  ];
  $theme['color_field_formatter_swatch_option'] = [
    'variables' => [
      'id' => NULL,
      'name' => NULL,
      'input_type' => NULL,
      'value' => NULL,
      'shape' => NULL,
      'color' => NULL,
      'width' => NULL,
      'height' => NULL,
      'attributes' => NULL,
    ],
  ];
  return $theme;
}