You are here

public function YamlFormHandlerManager::getSortedDefinitions in YAML Form 8

Gets sorted plugin definitions.

Parameters

array[]|null $definitions: (optional) The plugin definitions to sort. If omitted, all plugin definitions are used.

Return value

array[] An array of plugin definitions, sorted by category and label.

Overrides CategorizingPluginManagerInterface::getSortedDefinitions

File

src/YamlFormHandlerManager.php, line 47

Class

YamlFormHandlerManager
Manages form handler plugins.

Namespace

Drupal\yamlform

Code

public function getSortedDefinitions(array $definitions = NULL) {

  // Sort the plugins first by category, then by label.
  $definitions = $this
    ->traitGetSortedDefinitions($definitions);

  // Do not display the 'broken' plugin in the UI.
  unset($definitions['broken']);
  return $definitions;
}