You are here

public function ExportTypeManager::getFormOptions in Entity Print 8.2

Gets an array of options suitable for Form API.

Return value

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

Overrides ExportTypeManagerInterface::getFormOptions

File

src/Plugin/ExportTypeManager.php, line 71

Class

ExportTypeManager
Export type manager.

Namespace

Drupal\entity_print\Plugin

Code

public function getFormOptions() {
  $export_types = [];
  $definitions = $this
    ->getDefinitions();
  foreach ($definitions as $export_type => $definition) {
    $export_types[$export_type] = $definition['label'];
  }
  return $export_types;
}