public function BlazyManagerBase::getLightboxes in Blazy 7
Same name and namespace in other branches
- 8.2 src/BlazyManagerBase.php \Drupal\blazy\BlazyManagerBase::getLightboxes()
- 8 src/BlazyManagerBase.php \Drupal\blazy\BlazyManagerBase::getLightboxes()
Gets the supported lightboxes.
Return value
array The supported lightboxes.
Overrides BlazyManagerInterface::getLightboxes
1 call to BlazyManagerBase::getLightboxes()
File
- src/
BlazyManagerBase.php, line 214
Class
- BlazyManagerBase
- Implements BlazyManagerInterface.
Namespace
Drupal\blazyCode
public function getLightboxes() {
$lightboxes = [];
foreach ([
'colorbox',
'photobox',
] as $lightbox) {
if (function_exists($lightbox . '_theme')) {
$lightboxes[] = $lightbox;
}
}
if (is_file(libraries_get_path('photobox') . '/photobox/jquery.photobox.js')) {
$lightboxes[] = 'photobox';
}
drupal_alter('blazy_lightboxes', $lightboxes);
return array_unique($lightboxes);
}