You are here

protected function InsertImageWidgetUtility::stylesListToOptions in Insert 8

@inheritdoc

Overrides InsertFileWidgetUtility::stylesListToOptions

File

src/Utility/InsertImageWidgetUtility.php, line 66

Class

InsertImageWidgetUtility

Namespace

Drupal\insert\Utility

Code

protected function stylesListToOptions($stylesList) {
  foreach ($stylesList as $styleName => $style) {

    /* @var ImageStyle|array $style */
    $stylesList[$styleName] = is_array($style) ? $style['label'] : $style
      ->label();
  }
  return $stylesList;
}