You are here

function slick_paragraphs_field_formatter_info_alter in Slick Paragraphs 8

Implements hook_field_formatter_info_alter().

File

./slick_paragraphs.module, line 11
Provides Slick integration with Paragraphs.

Code

function slick_paragraphs_field_formatter_info_alter(array &$info) {

  // Supports Media Entity via VEM within VEF if available.
  if (function_exists('slick_media_help')) {
    $info['slick_paragraphs'] = [
      'id' => 'slick_paragraphs',
      'label' => t('Slick Paragraphs Media'),
      'description' => t('Display the referenced paragraph with ME as a Slick Carousel'),
      'class' => 'Drupal\\slick_paragraphs\\Plugin\\Field\\FieldFormatter\\SlickParagraphsFormatter',
      'field_types' => [
        'entity_reference_revisions',
      ],
      'quickedit' => [
        'editor' => 'disabled',
      ],
      'provider' => 'slick_paragraphs',
    ];
  }
}