You are here

public function ImageEffectsPluginManager::getPluginOptions in Image Effects 8.3

Same name and namespace in other branches
  1. 8 src/Plugin/ImageEffectsPluginManager.php \Drupal\image_effects\Plugin\ImageEffectsPluginManager::getPluginOptions()
  2. 8.2 src/Plugin/ImageEffectsPluginManager.php \Drupal\image_effects\Plugin\ImageEffectsPluginManager::getPluginOptions()

Gets a formatted list of available plugins.

Return value

array An array with the plugin ids as keys and the descriptions as values.

File

src/Plugin/ImageEffectsPluginManager.php, line 106

Class

ImageEffectsPluginManager
Plugin manager for image_effects plugins.

Namespace

Drupal\image_effects\Plugin

Code

public function getPluginOptions() {
  $options = [];
  foreach ($this
    ->getAvailablePlugins() as $plugin) {
    $options[$plugin['id']] = new FormattableMarkup('<b>@title</b> - @description', [
      '@title' => $plugin['short_title'],
      '@description' => $plugin['help'],
    ]);
  }
  return $options;
}