public function StyleBase::getStyle in GridStack 8.2
Returns a style.
8 calls to StyleBase::getStyle()
- Extras::afterBuildExtras in src/
Plugin/ gridstack/ stylizer/ Extras.php - Provides preview classes.
- Extras::attach in src/
Plugin/ gridstack/ stylizer/ Extras.php - Provides gridstack skins and libraries.
- Media::mediaSettings in src/
Plugin/ gridstack/ stylizer/ Media.php - Returns the data understood by Blazy for CSS background.
- Media::prepareMedia in src/
Plugin/ gridstack/ stylizer/ Media.php - Returns the formatted media as Blazy output.
- Media::prepareOverlay in src/
Plugin/ gridstack/ stylizer/ Media.php - Returns the media overlay.
File
- src/
Plugin/ gridstack/ stylizer/ StyleBase.php, line 145
Class
- StyleBase
- Provides the base styles.
Namespace
Drupal\gridstack\Plugin\gridstack\stylizerCode
public function getStyle($key, array $settings, $group = 'extras') {
$values = empty($settings['styles'][$group]) ? [] : $settings['styles'][$group];
if ($key == 'all') {
return is_array($values) ? array_filter($values) : $values;
}
$output = empty($values[$key]) ? FALSE : $values[$key];
// Chances are optionset is updated, but Layout Builder settings not.
if ($key == 'ete' && $output && isset($settings['region']['_fw'])) {
$output = $settings['region']['_fw'];
}
return $output;
}