function _xbbcode_build_handlers in Extensible BBCode 8.2
Same name and namespace in other branches
- 8 xbbcode.inc \_xbbcode_build_handlers()
- 7 xbbcode.inc \_xbbcode_build_handlers()
Discover the handlers by module hook invokation.
Return value
An array keyed by tag name. Each element is an array.
- the 'modules' key contains a list of public module names (keyed by internal name) that provide this tag.
- the 'info' key contains the data returned by each module's hook.
1 call to _xbbcode_build_handlers()
- XBBCodeHandlerForm::buildFormHandlers in src/
Form/ XBBCodeHandlerForm.php - Generate the handler subform.
File
- ./
xbbcode.inc, line 19 - General library of internal functions only called by this module.
Code
function _xbbcode_build_handlers() {
$module_names = _xbbcode_module_names();
$handlers = array();
foreach ($module_names as $module => $name) {
$tags = Drupal::moduleHandler()
->invoke($module, 'xbbcode_info');
foreach ($tags as $tag_name => $info) {
$handlers[$tag_name]['modules'][$module] = $name;
$handlers[$tag_name]['info'][$module] = $info;
}
}
ksort($handlers);
return $handlers;
}