You are here

public function PagererStyleManager::getPluginOptions in Pagerer 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/PagererStyleManager.php \Drupal\pagerer\Plugin\PagererStyleManager::getPluginOptions()

Returns a list of Pagerer style plugins.

Parameters

string $style_type: The style type for which to build the list {base|composite}.

Return value

array An associative array of plugins id => short_title

Overrides PagererStyleManagerInterface::getPluginOptions

File

src/Plugin/PagererStyleManager.php, line 45

Class

PagererStyleManager
Plugin manager for Pagerer style plugins.

Namespace

Drupal\pagerer\Plugin

Code

public function getPluginOptions($style_type) {
  $options = [];
  foreach ($this
    ->getDefinitions() as $plugin) {
    if ($plugin['style_type'] == $style_type) {
      $options[$plugin['id']] = $plugin['short_title'];
    }
  }
  asort($options);
  return $options;
}