Fieldset.php in Open Social 8.8
Same filename and directory in other branches
- 8.9 themes/socialbase/src/Plugin/Preprocess/Fieldset.php
- 8 themes/socialbase/src/Plugin/Preprocess/Fieldset.php
- 8.2 themes/socialbase/src/Plugin/Preprocess/Fieldset.php
- 8.3 themes/socialbase/src/Plugin/Preprocess/Fieldset.php
- 8.4 themes/socialbase/src/Plugin/Preprocess/Fieldset.php
- 8.5 themes/socialbase/src/Plugin/Preprocess/Fieldset.php
- 8.6 themes/socialbase/src/Plugin/Preprocess/Fieldset.php
- 8.7 themes/socialbase/src/Plugin/Preprocess/Fieldset.php
Namespace
Drupal\socialbase\Plugin\PreprocessFile
themes/socialbase/src/Plugin/Preprocess/Fieldset.phpView source
<?php
namespace Drupal\socialbase\Plugin\Preprocess;
use Drupal\bootstrap\Plugin\Preprocess\PreprocessBase;
use Drupal\bootstrap\Utility\Element;
use Drupal\bootstrap\Utility\Variables;
/**
* Pre-processes variables for the "fieldset" theme hook.
*
* @ingroup plugins_preprocess
*
* @BootstrapPreprocess("fieldset")
*/
class Fieldset extends PreprocessBase {
/**
* {@inheritdoc}
*/
protected function preprocessElement(Element $element, Variables $variables) {
if (isset($element['#type']) && $element['#type'] == ('radios' || 'checkboxes')) {
$variables['form_group'] = TRUE;
}
}
}