Results
29.06.2020
layout_builder_at 8.x-2.11 ::
layout_builder_at.module
/**
* Implements hook_theme_registry_alter().
*/
function layout_builder_at_theme_registry_alter(&$theme_registry): void {
// Removes layout_builder_preprocess_language_content_settings_table() to
// remove the 'Non translatable' warning.
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) { 06.10.2020
layout_builder_component_attributes 1.1.0 ::
tests/modules/layout_builder_component_attributes_test/layout_builder_component_attributes_test.module
/**
* Implements hook_theme_registry_alter().
*/
function layout_builder_component_attributes_test_theme_registry_alter(&$theme_registry) {
// Use a lifted copy of block.html.twig from the Classy theme.
// As opposed to the template file provided by the block module, this file
// renders {{ content }} in a wrapper <div> element with content_attributes
// being rendered on the wrapper.
$theme_registry['block']['path'] = \Drupal::service('extension.list.module')->getPath('layout_builder_component_attributes_test') . '/templates';
} 02.09.2021
layout_builder_widget 8.x-1.2 ::
layout_builder_widget.module
/**
* Implements hook_theme_registry_alter().
*/
function layout_builder_widget_theme_registry_alter(&$theme_registry) {
// Remove the 'Warning: Layout Builder does not support translating layout'
// from admin/config/regional/content-language page.
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, TRUE);
if ($index !== FALSE) { 20.10.2020
layout_paragraphs 1.0.x-dev ::
tests/modules/layout_paragraphs_altered_template_test/layout_paragraphs_altered_template_test.module
* Replaces the paragraphs template directory with test templates.
*/
function layout_paragraphs_altered_template_test_theme_registry_alter(&$theme_registry) {
$theme_registry['paragraph']['path'] = \Drupal::service('extension.list.module')->getPath('layout_paragraphs_altered_template_test') . '/templates';
} 05.10.2020
layoutcomponents 8.x-1.14-beta2 ::
src/LcTheme.php
/**
* Implements hook_theme_registry_alter() for LC pages.
*
* @see \hook_theme_registry_alter()
*/
public function themeRegistryAlter(&$theme_registry) {
if (!\Drupal::hasService('plugin.manager.core.layout')) {
return;
} 05.10.2020
layoutcomponents 8.x-1.14-beta2 ::
layoutcomponents.module
/**
* Implements hook_theme_registry_alter().
*/
function layoutcomponents_theme_registry_alter(&$theme_registry) {
return \Drupal::service('class_resolver')
->getInstanceFromDefinition(LcTheme::class)
->themeRegistryAlter($theme_registry);
}
/** 12.08.2019
lazyloader 8.x-1.x-dev ::
lazyloader.module
/**
* Implements hook_theme_registry_alter().
*/
function lazyloader_theme_registry_alter(&$theme_registry) {
$alter = new ThemeRegistryAlter(\Drupal::moduleHandler(), \Drupal::configFactory());
$alter->themeRegistryAlter($theme_registry);
}
/**
* Implements hook_preprocess_image(). 30.07.2020
lb_claro 8.x-1.0-beta3 ::
lb_claro.module
/**
* Implements hook_theme_registry_alter().
*/
function lb_claro_theme_registry_alter(&$theme_registry): void {
$claro_path = \Drupal::service('extension.list.theme')->getPath('claro');
// Add media-library templates directly copied from Claro.
$theme_registry['views_view__media_library__widget'] = $theme_registry['views_view'];
$theme_registry['views_view__media_library__widget']['template'] = 'views-view--media-library';
$theme_registry['views_view__media_library__widget']['path'] = $claro_path . '/templates/media-library'; 02.10.2020
lightning_workflow 8.x-3.x-dev ::
lightning_workflow.module
/**
* Implements hook_theme_registry_alter().
*/
function lightning_workflow_theme_registry_alter(array &$theme_registry) {
foreach ($theme_registry as $hook => &$info) {
if ($hook == 'field' || (isset($info['base hook']) && $info['base hook'] == 'field')) {
// We wrap around Quick Edit's preprocess function, so it should not be
// run directly.
$info['preprocess functions'] = array_diff($info['preprocess functions'], ['quickedit_preprocess_field']);
} 14.10.2020
maestro 3.0.1-rc2 ::
maestro.module
/**
* Implements hook_theme_registry_alter().
*/
function maestro_theme_registry_alter(&$theme_registry) {
// We need to rely on the rest of what Views does for us as we're messing with the table output
// so we'll first tell the theme registry to have the same settings as the original views table.
$theme_registry['views_view_table__maestro__all_flows_full'] = $theme_registry['views_view_table'];
// Now, we actually want to use our own template, which is inside of our Maestro module templates folder.
$theme_registry['views_view_table__maestro__all_flows_full']['template'] = 'views-view-table--maestro--all-flows-full'; 25.09.2019
mailjet 8.x-2.7 ::
mailjet.module
/**
* Implements hook_theme_registry_alter
*/
function mailjet_theme_registry_alter(&$theme_registry)
{
$theme_registry['block__local_actions_block']['path'] = Drupal::service('extension.list.module')->getPath('mailjet') . '/templates';
}
function mailjet_theme()
{ 09.11.2022
maintenance_page_node 1.0.0-beta2 ::
maintenance_page_node.module
/**
* Implements hook_theme_registry_alter().
*/
function maintenance_page_node_theme_registry_alter(&$theme_registry): void {
$theme_registry['maintenance_page']['path'] = \Drupal::service('extension.list.module')->getPath('maintenance_page_node') . '/templates';
} 07.06.2020
manage_display_extras 8.x-1.0-beta2 ::
modules/manage_display_node_created/manage_display_node_created.module
/**
* Implements hook_theme_registry_alter().
*/
function manage_display_node_created_theme_registry_alter(&$theme_registry) {
// Disable the 'inline' versions of node base field templates to workaround
// https://www.drupal.org/node/2993647.
unset($theme_registry['field__node__created']);
}
/** 20.03.2023
media_helper 2.0.0 ::
tests/modules/media_helper_test_with_picture_attributes/media_helper_test_with_picture_attributes.module
/**
* Implements hook_theme_registry_alter().
*/
function media_helper_test_with_picture_attributes_theme_registry_alter(array &$theme_registry): void {
$module_path = \Drupal::service('extension.list.module')
->getPath('media_helper_test_with_picture_attributes');
$module_template_path = $module_path . '/templates';
if (isset($theme_registry['responsive_image'])) {
$resp_image = &$theme_registry['responsive_image']; 20.03.2023
media_helper 2.0.0 ::
media_helper.module
/**
* Implements hook_theme_registry_alter().
*/
function media_helper_theme_registry_alter(array &$theme_registry): void {
if (isset($theme_registry['responsive_image_formatter'])) {
$theme_registry['responsive_image_formatter']['variables']['media_helper_attributes'] = [];
}
if (isset($theme_registry['responsive_image'])) {
$theme_registry['responsive_image']['variables']['media_helper_attributes'] = []; 08.06.2020
menu_block 8.x-1.x-dev ::
menu_block.module
/**
* Implements hook_theme_registry_alter().
*/
function menu_block_theme_registry_alter(&$theme_registry) {
// Add $menu_block_configuration as a variable to the 'menu' theme hook. Set
// its default value to be an empty array.
$theme_registry['menu']['variables']['menu_block_configuration'] = [];
}
/** 22.06.2020
menu_item_fields 8.x-1.5 ::
src/Hook/Theme.php
/**
* Implements hook_theme_registry_alter().
*
* @param array $themeRegistry
* The entire cache of theme registry information, post-processing.
*/
#[Hook('theme_registry_alter')]
public function themeRegistryAlter(&$themeRegistry): void { 07.07.2021
menus_attribute 8.x-1.2 ::
menus_attribute.module
/**
* Implements hook_theme_registry_alter().
*/
function menus_attribute_theme_registry_alter(&$theme_registry): void {
$theme_registry['menu']['path'] = \Drupal::service('extension.list.module')->getPath('menus_attribute') . '/templates';
} 02.02.2023
mercury_editor 2.0.x-dev ::
mercury_editor.module
/**
* Implements hook_theme_registry_alter().
*
* Make sure this module's hook_preprocess_html implementation runs last.
*/
function mercury_editor_theme_registry_alter(&$theme_registry) {
$index = array_search('mercury_editor_preprocess_html', $theme_registry['html']['preprocess functions']);
unset($theme_registry['html']['preprocess functions'][$index]);
$theme_registry['html']['preprocess functions'][50] = 'mercury_editor_preprocess_html';
}
/** 04.02.2023
mix 1.1.0-rc1 ::
mix.module
$variables['content']['#attributes']['class'][] = 'mix-dropdown';
// Rplace #theme to use custom template.
// @see mix_theme_registry_alter().
$variables['content']['#theme'] = 'mix_menu';
}
}
}
/**
* Implements hook_theme_registry_alter().
*/
function mix_theme_registry_alter(&$theme_registry) {
// Copy core menu theme settings to keep original behaviors.
$theme_registry['mix_menu'] = $theme_registry['menu'];
// Override template path to use custom template.
// @see mix_preprocess_block(). 