You are here

public function TextColor::buildConfigurationForm in Bootstrap Styles 1.0.x

Overrides StylePluginBase::buildConfigurationForm

File

src/Plugin/BootstrapStyles/Style/TextColor.php, line 27

Class

TextColor
Class TextColor.

Namespace

Drupal\bootstrap_styles\Plugin\BootstrapStyles\Style

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config();
  $form['typography']['text_colors'] = [
    '#type' => 'textarea',
    '#default_value' => $config
      ->get('text_colors'),
    '#title' => $this
      ->t('Text 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 text.</p>'),
    '#cols' => 60,
    '#rows' => 5,
  ];

  // Responsive.
  $fields = [
    'text_colors' => [
      'typography',
    ],
  ];
  $this
    ->buildBreakpointsConfigurationForm($form, $fields);
  return $form;
}