public function EditorManager::listOptions in Drupal 8
Same name and namespace in other branches
- 9 core/modules/editor/src/Plugin/EditorManager.php \Drupal\editor\Plugin\EditorManager::listOptions()
Populates a key-value pair of available text editors.
Return value
array An array of translated text editor labels, keyed by ID.
File
- core/
modules/ editor/ src/ Plugin/ EditorManager.php, line 42
Class
- EditorManager
- Configurable text editor manager.
Namespace
Drupal\editor\PluginCode
public function listOptions() {
$options = [];
foreach ($this
->getDefinitions() as $key => $definition) {
$options[$key] = $definition['label'];
}
return $options;
}