You are here

public function YamlFormExporterManager::getOptions in YAML Form 8

Get exporter plugins as options.

Return value

array An associative array of options keyed by plugin id.

Overrides YamlFormExporterManagerInterface::getOptions

File

src/YamlFormExporterManager.php, line 68

Class

YamlFormExporterManager
Manages results exporter plugins.

Namespace

Drupal\yamlform

Code

public function getOptions() {
  $plugin_definitions = $this
    ->getDefinitions();
  $plugin_definitions = $this
    ->getSortedDefinitions($plugin_definitions);
  $options = [];
  foreach ($plugin_definitions as $plugin_id => $plugin_definition) {
    $options[$plugin_id] = $plugin_definition['label'];
  }
  return $options;
}