public function TextAlignment::build in Bootstrap Styles 1.0.x
Overrides StylePluginBase::build
File
- src/
Plugin/ BootstrapStyles/ Style/ TextAlignment.php, line 90
Class
- TextAlignment
- Class TextAlignment.
Namespace
Drupal\bootstrap_styles\Plugin\BootstrapStyles\StyleCode
public function build(array $build, array $storage, $theme_wrapper = NULL) {
$classes = [];
if (isset($storage['text_alignment']['class'])) {
$classes[] = $storage['text_alignment']['class'];
}
// 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_alignment.build';
return $build;
}