You are here

function _xbbcode_module_names in Extensible BBCode 8.2

Same name and namespace in other branches
  1. 8 xbbcode.inc \_xbbcode_module_names()
  2. 7 xbbcode.inc \_xbbcode_module_names()

End-user names of all modules that implement hook_xbbcode_info().

These names are displayed on the settings form when choosing a module that should handle each tag. The xbbcode module itself is renamed "Custom" since its tags are the ones entered through the admin interface.

1 call to _xbbcode_module_names()
_xbbcode_build_handlers in ./xbbcode.inc
Discover the handlers by module hook invokation.

File

./xbbcode.inc, line 119
General library of internal functions only called by this module.

Code

function _xbbcode_module_names() {
  $modules =& drupal_static(__FUNCTION__, array());
  if (!$modules) {
    $info = system_get_info('module');
    foreach (Drupal::moduleHandler()
      ->getImplementations('xbbcode_info') as $module) {
      $modules[$module] = $info[$module]['name'];
    }
    $modules['xbbcode'] = 'Custom';
  }
  return $modules;
}