Retrieve a list of all available skins in the system.
2 calls to Slideshow::getSkins()
- Slideshow::buildOptionsForm in src/
Plugin/ views/ style/ Slideshow.php - Slideshow::submitOptionsForm in src/
Plugin/ views/ style/ Slideshow.php
File
-
src/
Plugin/ views/ style/ Slideshow.php, line 328
Class
- Slideshow
- Style plugin to render each item in a grid cell.
Namespace
Drupal\views_slideshow\Plugin\views\styleCode
public function getSkins() {
static $skins;
if (empty($skins)) {
$skins = array();
// Call all modules that use hook_views_slideshow_skin_info.
foreach (\Drupal::moduleHandler()->getImplementations('views_slideshow_skin_info') as $module) {
$skin_items = call_user_func($module . '_views_slideshow_skin_info');
if (isset($skin_items) && is_array($skin_items)) {
foreach (array_keys($skin_items) as $skin) {
// Ensure that the definition is complete, so we don't need lots
// of error checking later.
$skin_items[$skin] += array(
'class' => 'default',
'name' => t('Untitled skin'),
'module' => $module,
'libraries' => array(),
);
}
$skins = array_merge($skins, $skin_items);
}
}
}
return $skins;
}