You are here

public function Background::buildStyleFormElements in Bootstrap Styles 1.0.x

Overrides StylesGroupPluginBase::buildStyleFormElements

File

src/Plugin/BootstrapStyles/StylesGroup/Background.php, line 40

Class

Background
Class Background.

Namespace

Drupal\bootstrap_styles\Plugin\BootstrapStyles\StylesGroup

Code

public function buildStyleFormElements(array &$form, FormStateInterface $form_state, $storage) {

  // Responsive.
  $this
    ->buildBreakpointsFields($form, 'background');
  $form['background_type'] = [
    '#type' => 'radios',
    '#options' => [],
    '#title' => $this
      ->t('Background type'),
    '#title_display' => 'invisible',
    '#default_value' => NULL,
    '#validated' => TRUE,
    '#attributes' => [
      'class' => [
        'bs_col--full',
        'bs_background--type',
      ],
    ],
    '#disable_live_preview' => TRUE,
  ];
  return $form;
}