public function BlazyManagerBase::getLightboxes in Blazy 8.2
Same name and namespace in other branches
- 8 src/BlazyManagerBase.php \Drupal\blazy\BlazyManagerBase::getLightboxes()
- 7 src/BlazyManagerBase.php \Drupal\blazy\BlazyManagerBase::getLightboxes()
Gets the supported lightboxes.
Return value
array The supported lightboxes.
Overrides BlazyManagerInterface::getLightboxes
2 calls to BlazyManagerBase::getLightboxes()
- BlazyManagerBase::attach in src/
BlazyManagerBase.php - Returns array of needed assets suitable for #attached property.
- BlazyManagerBase::getCommonSettings in src/
BlazyManagerBase.php - Returns the common UI settings inherited down to each item.
File
- src/
BlazyManagerBase.php, line 315
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($this->root . '/libraries/photobox/photobox/jquery.photobox.js')) {
$lightboxes[] = 'photobox';
}
$this->moduleHandler
->alter('blazy_lightboxes', $lightboxes);
return array_unique($lightboxes);
}