You are here

protected function MediaElementVideoFieldFormatter::getImageStyleOptions in MediaElement 8

Returns array of image style information for settings form.

Return value

array The image style data as [machine_name => Label].

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

File

src/Plugin/Field/FieldFormatter/MediaElementVideoFieldFormatter.php, line 129

Class

MediaElementVideoFieldFormatter
Plugin implementation of the 'mediaelement_file_video' formatter.

Namespace

Drupal\mediaelement\Plugin\Field\FieldFormatter

Code

protected function getImageStyleOptions() {
  $style_names = array_map(function ($style) {
    return $style
      ->label();
  }, $this->imageStyleStorage
    ->loadMultiple());
  return [
    'raw' => $this
      ->t('Original Image'),
  ] + $style_names;
}