You are here

private function AvatarGeneratorPreviewWidget::getPreviewImageStyle in Avatar Kit 8

Get label of preview image style.

Return value

string|null Label of image style, or NULL if not set.

1 call to AvatarGeneratorPreviewWidget::getPreviewImageStyle()
AvatarGeneratorPreviewWidget::settingsSummary in src/Plugin/Field/FieldWidget/AvatarGeneratorPreviewWidget.php
Returns a short summary for the current widget settings.

File

src/Plugin/Field/FieldWidget/AvatarGeneratorPreviewWidget.php, line 57

Class

AvatarGeneratorPreviewWidget
Widget for avatar generator selection fields.

Namespace

Drupal\avatars\Plugin\Field\FieldWidget

Code

private function getPreviewImageStyle() {
  $image_styles = image_style_options(FALSE);
  unset($image_styles['']);
  $image_style_setting = $this
    ->getSetting('preview_image_style');
  return isset($image_styles[$image_style_setting]) ? $image_styles[$image_style_setting] : NULL;
}