protected function FoundationBase::setClassOptions in GridStack 8.2
Sets the gridstack engine classes.
@inheritdoc
Overrides GridStackEnginePluginBase::setClassOptions
File
- src/
Plugin/ gridstack/ engine/ FoundationBase.php, line 43
Class
- FoundationBase
- Provides the base Foundation layout engine.
Namespace
Drupal\gridstack\Plugin\gridstack\engineCode
protected function setClassOptions() {
if (!isset($this->setClassOptions)) {
$text = $text_align = $text_transform = [];
$utility = [
'clearfix',
'radius',
'rounded',
'shadow',
];
$visibility = [
'hide',
'visible',
'show-for-medium',
'show-for-large',
'show-for-small-only',
'show-for-medium-only',
'show-for-large-only',
'hide-for-medium',
'hide-for-large',
'hide-for-small-only',
'hide-for-medium-only',
'hide-for-large-only',
];
foreach ([
'hide',
'nowrap',
'truncate',
'wrap',
] as $key) {
$text[] = 'text-' . $key;
}
foreach ([
'left',
'right',
'center',
'justify',
] as $key) {
$text_align[] = 'text-' . $key;
}
foreach ([
'lowercase',
'uppercase',
'capitalize',
] as $key) {
$text_transform[] = 'text-' . $key;
}
// Classes, keyed by group.
$this->setClassOptions = NestedArray::mergeDeep([
'text' => $text,
'text_align' => $text_align,
'text_transform' => $text_transform,
'utility' => $utility,
'visibility' => $visibility,
], $this
->getVersionClasses());
}
return $this->setClassOptions;
}