public function SlickManager::slick in Slick Carousel 7.3
Same name and namespace in other branches
- 8.2 src/SlickManager.php \Drupal\slick\SlickManager::slick()
- 8 src/SlickManager.php \Drupal\slick\SlickManager::slick()
Returns a cacheable renderable array of a single slick instance.
Parameters
array $build: An associative array containing:
- items: An array of slick contents: text, image or media.
- options: An array of key:value pairs of custom JS overrides.
- optionset: The cached optionset object to avoid multiple invocations.
- settings: An array of key:value pairs of HTML/layout related settings.
Return value
array The cacheable renderable array of a slick instance, or empty array.
Overrides SlickManagerInterface::slick
1 call to SlickManager::slick()
File
- src/
SlickManager.php, line 239
Class
- SlickManager
- Implements SlickManagerInterface.
Namespace
Drupal\slickCode
public function slick(array $build = []) {
foreach (SlickDefault::themeProperties() as $key) {
$build[$key] = isset($build[$key]) ? $build[$key] : [];
}
return empty($build['items']) ? [] : [
'#theme' => 'slick',
'#items' => [],
'#build' => $build,
'#pre_render' => [
'slick_pre_render',
],
];
}