public function TextColor::build in Bootstrap Styles 1.0.x
Overrides StylePluginBase::build
File
- src/
Plugin/ BootstrapStyles/ Style/ TextColor.php, line 112
Class
- TextColor
- Class TextColor.
Namespace
Drupal\bootstrap_styles\Plugin\BootstrapStyles\StyleCode
public function build(array $build, array $storage, $theme_wrapper = NULL) {
$classes = [];
if (isset($storage['text_color']['class'])) {
$classes[] = $storage['text_color']['class'];
}
// Responsive.
$fields = [
'text_color',
];
$this
->buildBreakpoints($classes, $storage, $fields);
// Add the classes to the build.
$build = $this
->addClassesToBuild($build, $classes, $theme_wrapper);
// Attach bs-classes to the build.
$build['#attached']['library'][] = 'bootstrap_styles/plugin.text_color.build';
return $build;
}