You are here

protected function Fieldset::preprocessElement in Open Social 8.2

Same name and namespace in other branches
  1. 8.9 themes/socialbase/src/Plugin/Preprocess/Fieldset.php \Drupal\socialbase\Plugin\Preprocess\Fieldset::preprocessElement()
  2. 8 themes/socialbase/src/Plugin/Preprocess/Fieldset.php \Drupal\socialbase\Plugin\Preprocess\Fieldset::preprocessElement()
  3. 8.3 themes/socialbase/src/Plugin/Preprocess/Fieldset.php \Drupal\socialbase\Plugin\Preprocess\Fieldset::preprocessElement()
  4. 8.4 themes/socialbase/src/Plugin/Preprocess/Fieldset.php \Drupal\socialbase\Plugin\Preprocess\Fieldset::preprocessElement()
  5. 8.5 themes/socialbase/src/Plugin/Preprocess/Fieldset.php \Drupal\socialbase\Plugin\Preprocess\Fieldset::preprocessElement()
  6. 8.6 themes/socialbase/src/Plugin/Preprocess/Fieldset.php \Drupal\socialbase\Plugin\Preprocess\Fieldset::preprocessElement()
  7. 8.7 themes/socialbase/src/Plugin/Preprocess/Fieldset.php \Drupal\socialbase\Plugin\Preprocess\Fieldset::preprocessElement()
  8. 8.8 themes/socialbase/src/Plugin/Preprocess/Fieldset.php \Drupal\socialbase\Plugin\Preprocess\Fieldset::preprocessElement()

Preprocess the variables array if an element is present.

Parameters

\Drupal\bootstrap\Utility\Element $element: The Element object.

\Drupal\bootstrap\Utility\Variables $variables: The Variables object.

Overrides PreprocessBase::preprocessElement

File

themes/socialbase/src/Plugin/Preprocess/Fieldset.php, line 21

Class

Fieldset
Pre-processes variables for the "fieldset" theme hook.

Namespace

Drupal\socialbase\Plugin\Preprocess

Code

protected function preprocessElement(Element $element, Variables $variables) {
  if (isset($element['#type']) && $element['#type'] == ('radios' || 'checkboxes')) {
    $variables['form_group'] = TRUE;
  }
}