protected function Classes::getBasePresetOptions in GridStack 8.2
2 calls to Classes::getBasePresetOptions()
- Classes::getPresetOptions in src/
Plugin/ gridstack/ stylizer/ Classes.php - Classes::getPresetRowOptions in src/
Plugin/ gridstack/ stylizer/ Classes.php
File
- src/
Plugin/ gridstack/ stylizer/ Classes.php, line 253
Class
- Classes
- Provides the classes styles.
Namespace
Drupal\gridstack\Plugin\gridstack\stylizerCode
protected function getBasePresetOptions(array $data, array $rm, $alter = 'gridstack_classes_preset_options') {
$options = [];
foreach ($data as $option) {
$title = str_replace($rm, '', $option);
$title = str_replace([
'_',
'-',
], ' ', $title);
$options[$option] = $this
->t('@title', [
'@title' => Unicode::ucfirst($title),
]);
}
$this->manager
->getModuleHandler()
->alter($alter, $options, $data);
ksort($options);
return $options;
}