protected function StyleBase::parseClasses in GridStack 8.2
Parses the given string classes.
1 call to StyleBase::parseClasses()
- StyleBase::attributes in src/
Plugin/ gridstack/ stylizer/ StyleBase.php - Provides both CSS grid and js-driven attributes configurable via UI.
File
- src/
Plugin/ gridstack/ stylizer/ StyleBase.php, line 223
Class
- StyleBase
- Provides the base styles.
Namespace
Drupal\gridstack\Plugin\gridstack\stylizerCode
protected function parseClasses(array &$attributes, $string = '') {
$classes = array_map('\\Drupal\\Component\\Utility\\Html::cleanCssIdentifier', explode(' ', $string));
$attributes['class'] = empty($attributes['class']) ? array_unique($classes) : array_unique(array_merge($attributes['class'], $classes));
}