function hook_lazy_field_formatters_alter in Lazy-load 8.3
Alter enabled field formatters for lazy-loading.
When there's a module offering an image-based field-formatter, but Lazy-loading doesn't support yet, you can still introduce that image formatter in your custom module.
Parameters
array $formatters: Array of field formatters.
Return value
array Returns an array of field formatter names.
1 invocation of hook_lazy_field_formatters_alter()
- lazy_field_formatters in ./
lazy.module - Supported field formatters that Lazy-load can be enabled.
File
- ./
lazy.api.php, line 41 - Lazy-load API.
Code
function hook_lazy_field_formatters_alter(array &$formatters) {
$formatters[] = 'xyz_module_field_formatter';
return $formatters;
}