function EditorManager::listOptions
Same name in other branches
- 9 core/modules/editor/src/Plugin/EditorManager.php \Drupal\editor\Plugin\EditorManager::listOptions()
- 8.9.x core/modules/editor/src/Plugin/EditorManager.php \Drupal\editor\Plugin\EditorManager::listOptions()
- 10 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 43
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.