You are here

protected function SlickManager::prepareAttributes in Slick Carousel 8.2

Same name and namespace in other branches
  1. 7.3 src/SlickManager.php \Drupal\slick\SlickManager::prepareAttributes()

Prepare attributes for the known module features, not necessarily users'.

1 call to SlickManager::prepareAttributes()
SlickManager::preRenderSlick in src/SlickManager.php
Builds the Slick instance as a structured array ready for ::renderer().

File

src/SlickManager.php, line 85

Class

SlickManager
Implements BlazyManagerInterface, SlickManagerInterface.

Namespace

Drupal\slick

Code

protected function prepareAttributes(array $build = []) {
  $settings = $build['settings'];
  $attributes = isset($build['attributes']) ? $build['attributes'] : [];
  if ($settings['display'] == 'main') {
    Blazy::containerAttributes($attributes, $settings);
  }
  return $attributes;
}