public function BackgroundColor::buildConfigurationForm in Bootstrap Styles 1.0.x
Overrides StylePluginBase::buildConfigurationForm
File
- src/
Plugin/ BootstrapStyles/ Style/ BackgroundColor.php, line 27
Class
- BackgroundColor
- Class BackgroundColor.
Namespace
Drupal\bootstrap_styles\Plugin\BootstrapStyles\StyleCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$config = $this
->config();
$form['background']['background_colors'] = [
'#type' => 'textarea',
'#default_value' => $config
->get('background_colors'),
'#title' => $this
->t('Background colors (classes)'),
'#description' => $this
->t('<p>Enter one value per line, in the format <b>key|label</b> where <em>key</em> is the CSS class name (without the .), and <em>label</em> is the human readable name of the background.</p>'),
'#cols' => 60,
'#rows' => 5,
];
// Responsive.
$fields = [
'background_colors' => [
'background',
],
];
$this
->buildBreakpointsConfigurationForm($form, $fields);
return $form;
}