protected function FieldGroupFormatterBase::getClasses in Field Group 8.3
Same name and namespace in other branches
- 8 src/FieldGroupFormatterBase.php \Drupal\field_group\FieldGroupFormatterBase::getClasses()
Get the classes to add to the group.
7 calls to FieldGroupFormatterBase::getClasses()
- Accordion::process in src/
Plugin/ field_group/ FieldGroupFormatter/ Accordion.php - Allows the field group formatter to manipulate the field group array and attach the formatters elements. The process method is called in the #process part of theme layer, and is currently used for forms. The preRender method is called in the…
- AccordionItem::process in src/
Plugin/ field_group/ FieldGroupFormatter/ AccordionItem.php - Allows the field group formatter to manipulate the field group array and attach the formatters elements. The process method is called in the #process part of theme layer, and is currently used for forms. The preRender method is called in the…
- Details::process in src/
Plugin/ field_group/ FieldGroupFormatter/ Details.php - Allows the field group formatter to manipulate the field group array and attach the formatters elements. The process method is called in the #process part of theme layer, and is currently used for forms. The preRender method is called in the…
- Fieldset::process in src/
Plugin/ field_group/ FieldGroupFormatter/ Fieldset.php - Allows the field group formatter to manipulate the field group array and attach the formatters elements. The process method is called in the #process part of theme layer, and is currently used for forms. The preRender method is called in the…
- HtmlElement::process in src/
Plugin/ field_group/ FieldGroupFormatter/ HtmlElement.php - Allows the field group formatter to manipulate the field group array and attach the formatters elements. The process method is called in the #process part of theme layer, and is currently used for forms. The preRender method is called in the…
1 method overrides FieldGroupFormatterBase::getClasses()
- Tabs::getClasses in src/
Plugin/ field_group/ FieldGroupFormatter/ Tabs.php - Get the classes to add to the group.
File
- src/
FieldGroupFormatterBase.php, line 171
Class
- FieldGroupFormatterBase
- Base class for 'Fieldgroup formatter' plugin implementations.
Namespace
Drupal\field_groupCode
protected function getClasses() {
$classes = [];
// Add a required-fields class to trigger the js.
if ($this
->getSetting('required_fields')) {
$classes[] = 'required-fields';
$classes[] = 'field-group-' . str_replace('_', '-', $this
->getBaseId());
}
if ($this
->getSetting('classes')) {
$classes = array_merge($classes, explode(' ', trim($this
->getSetting('classes'))));
}
return $classes;
}