protected function Color::colorElement in GridStack 8.2
Provides extras form elements.
1 call to Color::colorElement()
- Form::styleForm in src/
Plugin/ gridstack/ stylizer/ Form.php
File
- src/
Plugin/ gridstack/ stylizer/ Color.php, line 42
Class
- Color
- Provides the color styles.
Namespace
Drupal\gridstack\Plugin\gridstack\stylizerCode
protected function colorElement($optionset, FormStateInterface $form_state, array $settings, array $extras = []) {
$element = [
'#type' => 'container',
];
foreach (GridStackDefault::colorElements() as $key) {
$value = isset($settings['colors'][$key]) ? $settings['colors'][$key] : '';
$element[$key] = $this
->styleElement($key, $value, $settings);
}
return $element;
}