function _jcarousel_help_render_gen in jCarousel 8.4
Same name and namespace in other branches
- 8.5 jcarousel.module \_jcarousel_help_render_gen()
Builds carousel from image URLs.
Parameters
array $images: Array of image URLs.
array $options: The carousel options.
Return value
array Renderable array of carousel.
4 calls to _jcarousel_help_render_gen()
- _jcarousel_help_backward_compatibility in ./
jcarousel.module - Backward compatibility hook_help() helper.
- _jcarousel_help_simple in ./
jcarousel.module - _jcarousel_help_skins in ./
jcarousel.module - _jcarousel_help_vertical in ./
jcarousel.module
File
- ./
jcarousel.module, line 446 - Provides integration with 3rd party modules and the jCarousel library.
Code
function _jcarousel_help_render_gen($images, $options = []) {
$item_lists = [];
foreach ($images as $image) {
$item_lists[] = [
'#theme' => 'image',
'#uri' => $image,
'#width' => '150px',
'#height' => '100px',
'#alt' => t('Image alt'),
];
}
return [
'#theme' => 'jcarousel',
'#items' => $item_lists,
'#options' => $options,
];
}