public function CKEditorPluginManager::getButtons in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/ckeditor/src/CKEditorPluginManager.php \Drupal\ckeditor\CKEditorPluginManager::getButtons()
Retrieves all available CKEditor buttons, keyed by plugin ID.
Return value
array All available CKEditor buttons, with plugin IDs as keys and button metadata (as implemented by getButtons()) as values.
See also
CKEditorPluginButtonsInterface::getButtons()
File
- core/
modules/ ckeditor/ src/ CKEditorPluginManager.php, line 132 - Contains \Drupal\ckeditor\CKEditorPluginManager.
Class
- CKEditorPluginManager
- Provides a CKEditor Plugin plugin manager.
Namespace
Drupal\ckeditorCode
public function getButtons() {
$plugins = array_keys($this
->getDefinitions());
$buttons_plugins = array();
foreach ($plugins as $plugin_id) {
$plugin = $this
->createInstance($plugin_id);
if ($plugin instanceof CKEditorPluginButtonsInterface) {
$buttons_plugins[$plugin_id] = $plugin
->getButtons();
}
}
return $buttons_plugins;
}