protected function UninstallValidator::hasSlideshowBlocks in Lightning Media 8.4
Same name and namespace in other branches
- 8.3 modules/lightning_media_slideshow/src/UninstallValidator.php \Drupal\lightning_media_slideshow\UninstallValidator::hasSlideshowBlocks()
Determines if any slideshow blocks exist.
Return value
bool TRUE if there are slideshow blocks, FALSE otherwise.
1 call to UninstallValidator::hasSlideshowBlocks()
- UninstallValidator::validate in modules/
lightning_media_slideshow/ src/ UninstallValidator.php - Determines the reasons a module can not be uninstalled.
File
- modules/
lightning_media_slideshow/ src/ UninstallValidator.php, line 54
Class
- UninstallValidator
- Prevents this module from being uninstalled if any slideshow blocks exist.
Namespace
Drupal\lightning_media_slideshowCode
protected function hasSlideshowBlocks() {
$count = $this->blockContentStorage
->getQuery()
->condition('type', 'media_slideshow')
->accessCheck(FALSE)
->count()
->execute();
return !empty($count);
}