You are here

function slick_build in Slick Carousel 7.3

Same name and namespace in other branches
  1. 7.2 slick.module \slick_build()

To be removed.

Deprecated

in slick:7.x-3.0 and is removed from slick:7.x-4.0. Use SlickManager::build() instead.

See also

https://www.drupal.org/node/3031759

File

./slick.deprecated.inc, line 86
To be removed once Slick views, etc. have 3.x, or before Slick full release.

Code

function slick_build(array $items, array $options, array $settings = [], array $attach = [], $id = NULL, $optionset = NULL) {
  $loaded = isset($attach['css']) || isset($attach['js']) || isset($attach['library']);
  $attachments = $loaded ? $attach : slick_attach($attach, $settings);
  $build = [
    'items' => $items,
    'settings' => $settings,
    'options' => $options,
    'optionset' => $optionset,
    'attached' => $attachments,
  ];
  return slick()
    ->slick($build);
}