You are here

protected function MagnificPopup::getGalleryTypes in Magnific Popup 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldFormatter/MagnificPopup.php \Drupal\magnific_popup\Plugin\Field\FieldFormatter\MagnificPopup::getGalleryTypes()

Get an array of gallery types.

Return value

array An array of gallery types for use in display settings.

1 call to MagnificPopup::getGalleryTypes()
MagnificPopup::settingsForm in src/Plugin/Field/FieldFormatter/MagnificPopup.php
Returns a form to configure settings for the formatter.

File

src/Plugin/Field/FieldFormatter/MagnificPopup.php, line 158

Class

MagnificPopup
Magnific Popup field formatter.

Namespace

Drupal\magnific_popup\Plugin\Field\FieldFormatter

Code

protected function getGalleryTypes() {

  // Render cache means 'random image' is only random the first time.
  // Disabled until a better solution is found.
  return [
    'all_items' => $this
      ->t('Gallery: All Items Displayed'),
    'first_item' => $this
      ->t('Gallery: First Item Displayed'),
    'separate_items' => $this
      ->t('No Gallery: Display Each Item Separately'),
  ];
}