public function VisibilityChecker::isEnabled in Image Lazyloader 8
Asserts if Lazyloader is enabled.
Return value
bool Whether or not Lazyloader is enabled.
File
- src/
VisibilityChecker.php, line 71
Class
- VisibilityChecker
- Class VisibilityChecker.
Namespace
Drupal\lazyloaderCode
public function isEnabled() {
$enabled = $this->configFactory
->get('lazyloader.configuration')
->get('enabled');
$conditions_apply = $this
->resolveConditions(iterator_to_array($this
->getConditionList()
->getIterator()), 'and');
return $enabled && $conditions_apply;
}