You are here

public function BoxShadow::build in Bootstrap Styles 1.0.x

Overrides StylePluginBase::build

File

src/Plugin/BootstrapStyles/Style/BoxShadow.php, line 91

Class

BoxShadow
Class BoxShadow.

Namespace

Drupal\bootstrap_styles\Plugin\BootstrapStyles\Style

Code

public function build(array $build, array $storage, $theme_wrapper = NULL) {
  $classes = [];
  if (isset($storage['box_shadow']['class'])) {
    $classes[] = $storage['box_shadow']['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.box_shadow.build';
  return $build;
}