You are here

function slick_field_formatter_info_alter in Slick Carousel 8.2

Same name and namespace in other branches
  1. 8 slick.module \slick_field_formatter_info_alter()

Implements hook_field_formatter_info_alter().

@todo deprecated in blazy:8.x-2.0 and is removed from blazy:8.x-3.0. Use \Drupal\slick\Plugin\Field\FieldFormatter\SlickMediaFormatter instead.

See also

https://www.drupal.org/node/3103018

File

./slick.module, line 128
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 (slick()
    ->getModuleHandler()
    ->moduleExists('video_embed_media')) {
    $info['slick_file'] = [
      'id' => 'slick_file',
      'label' => t('Slick Image with VEF (deprecated)'),
      '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',
    ];
  }
}