public function DynamicLayoutForm::getWrapperClasses in Dynamic Layouts 8
1 call to DynamicLayoutForm::getWrapperClasses()
File
- src/
Form/ DynamicLayoutForm.php, line 373
Class
- DynamicLayoutForm
- Form controller for the DynamicLayout entity edit forms.
Namespace
Drupal\dynamic_layouts\FormCode
public function getWrapperClasses() {
$wrapper_classes_arr = [
'container-fluid',
];
/** @var \Drupal\dynamic_layouts\Entity\DynamicLayoutSettings $settings */
$frontend_library_class = 'custom';
if ($settings = $this->entityTypeManager
->getStorage('dynamic_layout_settings')
->load('settings')) {
$frontend_library = $settings
->getFrontendLibrary();
if ($frontend_library == 'bootstrap') {
$wrapper_classes_arr[] = $frontend_library_class . '-12';
}
else {
if ($column_count = $settings
->getGridColumnCount()) {
$wrapper_classes_arr[] = $frontend_library . '-' . $column_count;
}
}
}
$wrapper_classes_arr[] = $frontend_library_class;
return implode(' ', $wrapper_classes_arr);
}