function Ckeditor5TestHooks::entityBundleInfoAlter
Implements hook_entity_bundle_info_alter().
Attributes
#[Hook('entity_bundle_info_alter')]
File
-
core/
modules/ ckeditor5/ tests/ modules/ ckeditor5_test/ src/ Hook/ Ckeditor5TestHooks.php, line 17
Class
- Ckeditor5TestHooks
- Hook implementations for ckeditor5_test.
Namespace
Drupal\ckeditor5_test\HookCode
public function entityBundleInfoAlter(array &$bundles) : void {
if (isset($bundles['taxonomy_term'])) {
foreach ($bundles['taxonomy_term'] as $key => $bundle) {
$bundles['taxonomy_term'][$key]['ckeditor5_link_suggestions'] = TRUE;
}
}
if (isset($bundles['media'])) {
foreach ($bundles['media'] as $key => $bundle) {
$bundles['media'][$key]['ckeditor5_link_suggestions'] = TRUE;
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.