function LayoutBuilderHooks::themeRegistryAlter

Implements hook_theme_registry_alter().

Attributes

#[Hook('theme_registry_alter')]

File

core/modules/layout_builder/src/Hook/LayoutBuilderHooks.php, line 381

Class

LayoutBuilderHooks
Hook implementations for layout_builder.

Namespace

Drupal\layout_builder\Hook

Code

public function themeRegistryAlter(&$theme_registry) : void {
  // Move our preprocess to run after
  // content_translation_preprocess_language_content_settings_table().
  if (!empty($theme_registry['language_content_settings_table']['preprocess functions'])) {
    $preprocess_functions =& $theme_registry['language_content_settings_table']['preprocess functions'];
    $index = array_search('layout_builder_preprocess_language_content_settings_table', $preprocess_functions);
    if ($index !== FALSE) {
      unset($preprocess_functions[$index]);
      $preprocess_functions[] = 'layout_builder_preprocess_language_content_settings_table';
    }
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.