public function ThemeRegistryAlter::themeRegistryAlter in Image Lazyloader 8
Alters the theme registry.
Parameters
array $theme_registry: The theme registry.
File
- src/
Hooks/ ThemeRegistryAlter.php, line 46
Class
- ThemeRegistryAlter
- Class ThemeRegistryAlter.
Namespace
Drupal\lazyloader\HooksCode
public function themeRegistryAlter(array &$theme_registry) {
if ($this->config
->get('lazyloader.configuration')
->get('enabled')) {
$theme_registry['image']['path'] = $this->moduleHandler
->getModule('lazyloader')
->getPath() . '/templates';
$theme_registry['image']['template'] = 'image';
$theme_registry['responsive_image']['preprocess functions'][] = 'lazyloader_preprocess_responsive_image';
}
}