You are here

function _gutenberg_get_all_modules_settings in Gutenberg 8

Gets settings from all modules.

2 calls to _gutenberg_get_all_modules_settings()
gutenberg_form_node_form_alter in ./gutenberg.module
Implements hook_form_node_form_alter().
gutenberg_preprocess_node in ./gutenberg.module
Implements template_preprocess_node().

File

./gutenberg.module, line 840
Provides integration with the Gutenberg editor.

Code

function _gutenberg_get_all_modules_settings() {
  $settings =& drupal_static(__FUNCTION__);
  if (!isset($settings)) {
    $directories = \Drupal::service('module_handler')
      ->getModuleDirectories();
    $discovery = new YamlDiscovery('gutenberg', $directories);
    $settings = $discovery
      ->findAll();
  }
  return $settings;
}