function slick_field_formatter_info_alter in Slick Carousel 8
Same name and namespace in other branches
- 8.2 slick.module \slick_field_formatter_info_alter()
Implements hook_field_formatter_info_alter().
File
- ./
slick.module, line 44 - Slick carousel integration, the last carousel you'll ever need.
Code
function slick_field_formatter_info_alter(array &$info) {
// Supports Media Entity via VEM within VEF if available.
if (\Drupal::moduleHandler()
->moduleExists('video_embed_media')) {
$info['slick_file'] = [
'id' => 'slick_file',
'label' => t('Slick Image with Media'),
'description' => t('Display the images associated to VEM/ME as a simple mix of Slick image/video carousel.'),
'class' => 'Drupal\\slick\\Plugin\\Field\\FieldFormatter\\SlickFileFormatter',
'field_types' => [
'entity_reference',
'image',
],
'quickedit' => [
'editor' => 'disabled',
],
'provider' => 'slick',
];
}
}