Results

17.06.2020
progressive_image_loading 8.x-1.x-dev :: progressive_image_loading.module
/**
 * Implements hook_theme_registry_alter().
 */
function progressive_image_loading_theme_registry_alter(&$theme_registry) {
  // Prepare the module list adding '_preprocess' suffix for later use.
  $themes = array_map(
    function ($key) {
      return $key . '_preprocess';
    },
    array_keys(\Drupal::service('theme_handler')->listInfo())
26.06.2020
react_comments 8.x-1.0-beta2 :: react_comments.module
/**
 * Implements hook_theme_registry_alter().
 */
function react_comments_theme_registry_alter(&$theme_registry) {
  $theme_registry['field__comment']['path'] = \Drupal::service('extension.list.module')->getPath('react_comments') . '/templates';
}

/**
 * Implements hook_theme().
 */
17.06.2020
seaside_admin_toolbar 8.x-1.13 :: seaside_admin_toolbar.module
/**
 * Implements hook_theme_registry_alter
 */
function seaside_admin_toolbar_theme_registry_alter(&$theme_registry) {
  $theme_registry['toolbar']['path'] = drupal_get_path('module', 'seaside_admin_toolbar') . '/templates';
}


/**
 * Implements hook_toolbar_alter().
20.09.2020
sendinblue 8.x-1.7 :: sendinblue.module
 * Register a module (or theme's) theme implementations.
 *
 * @see hook_theme_registry_alter()
 */
function sendinblue_theme($existing, $type, $theme, $path) {
  return [
    'generateHomeLogout' => [
      'variables' => ['formulaire_api_key' => NULL],
    ],
24.11.2018
show_title 8.x-1.5 :: show_title.module
/**
 * Implements hook_theme_registry_alter().
 */
function show_title_theme_registry_alter(&$theme_registry) {

  $active_theme = \Drupal::theme()->getActiveTheme();

  // Check if file not exist in active theme.
  if (!file_exists($active_theme->getPath() . '/templates/node.html.twig')) {
14.09.2021
simple_forum 8.x-1.0 :: simple_forum.module
/**
 * Implements hook_theme_registry_alter().
 */
function simple_forum_theme_registry_alter(&$theme_registry) {
  // Replace the path to the registered template so that Drupal looks for
  // it in your module's templates folder.
  $theme_registry['comment__field_comments__simple_forum']['path'] = \Drupal::service('extension.list.module')->getPath('simple_forum') . '/templates';
  $theme_registry['comment__field_comments__simple_forum']['template'] = 'comments';
  $theme_registry['comment__field_comments__simple_forum']['theme path'] = \Drupal::service('extension.list.module')->getPath('simple_forum') . '/templates';
}
15.10.2020
simple_tmgmt 1.0.x-dev :: simple_tmgmt.module
// }.
/**
 * Implements hook_theme_registry_alter().
 */
// Function simple_tmgmt_theme_registry_alter(&$theme_registry) {
//  // Override tmgmt_data_items_form to optionally remove the validation tick boxes.
//  // They might not be wanted in some use cases (already translated content that will be reviewed in one step).
//  // @todo make it configurable first.
//  $theme_registry['tmgmt_data_items_form']['path'] = drupal_get_path('module', 'simple_tmgmt') . '/templates';
// }.
04.01.2020
sirv 8.x-3.0-beta4 :: sirv.module
/**
 * Implements hook_theme_registry_alter().
 */
function sirv_theme_registry_alter(&$theme_registry) {
  // Alter the image_formatter theme template to support storing Sirv data.
  if (isset($theme_registry['image_formatter'])) {
    $theme_registry['image_formatter']['variables']['sirv'] = [];
  }

  // Alter the image_style theme template to support storing Sirv data.
20.03.2025
sites_group_overrides 1.x-dev :: sites_group_overrides.module
/**
 * Implements hook_theme_registry_alter().
 *
 * Move sites_group_overrides_preprocess before contextual_preprocess.
 */
function sites_group_overrides_theme_registry_alter(&$theme_registry): void {
  foreach ($theme_registry as &$value) {
    if (empty($value['preprocess functions'])) {
      continue;
    }
    $key_a = array_search('sites_group_overrides_preprocess', $value['preprocess functions']);
    $key_b = array_search('contextual_preprocess', $value['preprocess functions']);
31.03.2023
social_event_invite_flow 1.0.0-beta3 :: social_event_invite_flow.module
  // We have to override the local actions block.
  // and render our own block instance in the view for placement.
  // hook_theme_registry_alter will ensure our hooks is invoked later.
  // That is also why hook_menu_local_actions_alter won't work.
  if ($variables['view']->id() === 'event_manage_enrollments') {
    /** @var \Drupal\social_event_invite\SocialEventInviteAccessHelper $access */
    $access = \Drupal::service('social_event_invite.access_helper');
    $access = $access->eventFeatureAccess();
/**
 * Implements hook_theme_registry_alter().
 */
function social_event_invite_flow_theme_registry_alter(&$theme_registry) {
  // Unfortunately the preprocess functions aren't ordered by module weight.
  // Changing module weight doesn't work, also with dependency set to
  // social_group this should be dealt with but isnt.
  // So we enforce our preprocess after social_group.
  if (!empty($theme_registry['views_view']['preprocess functions'])) {
    $current_key = array_search('social_event_invite_flow_preprocess_views_view', $theme_registry['views_view']['preprocess functions'], FALSE);
05.06.2023
social_lms_integrator 1.0.0-beta4 :: modules/social_lms_integrator_iteration_invite/social_lms_integrator_iteration_invite.module
  // We have to override the local actions block.
  // and render our own block instance in the view for placement.
  // hook_theme_registry_alter will ensure our hooks is invoked later.
  // That is also why hook_menu_local_actions_alter won't work.
  if ($variables['view']->id() === 'iteration_manage_enrollments') {
    /** @var \Drupal\social_lms_integrator_iteration_invite\SocialLMSIntegratorIterationInviteAccessHelper $access */
    $access = \Drupal::service('social_lms_integrator_iteration_invite.access_helper');
    $access = $access->iterationFeatureAccess();
/**
 * Implements hook_theme_registry_alter().
 */
function social_lms_integrator_iteration_invite_theme_registry_alter(&$theme_registry) {
  // Unfortunately the preprocess functions aren't ordered by module weight.
  // Changing module weight doesn't work, also with dependency set to
  // social_group this should be dealt with but isnt.
  // So we enforce our preprocess after social_group.
  if (!empty($theme_registry['views_view']['preprocess functions'])) {
    $current_key = array_search('social_lms_integrator_iteration_invite_preprocess_views_view', $theme_registry['views_view']['preprocess functions'], FALSE);
12.09.2020
social_media_links 8.x-2.x-dev :: modules/social_media_links_field/social_media_links_field.module
/**
 * Implements hook_theme_registry_alter().
 */
function social_media_links_field_theme_registry_alter(&$theme_registry) {
  $theme_registry['social_media_links_platforms']['variables']['entity_type'] = NULL;
  $theme_registry['social_media_links_platforms']['variables']['entity_bundle'] = NULL;
  $theme_registry['social_media_links_platforms']['variables']['field_name'] = NULL;
}

/**
13.08.2020
status_messages 8.x-4.2 :: status_messages.module
/**
 * Implements hook_theme_registry_alter().
 */
function status_messages_theme_registry_alter(&$theme_registry) {
  $theme_registry['status_messages']['path'] = \Drupal::service('extension.list.module')->getPath('status_messages') . '/templates/misc';
}

/**
 * Implements hook_preprocess().
 */
07.09.2022
storm 1.x-dev :: modules/storm_blocks/modules/storm_block_accordion/storm_block_accordion.module
/**
 * Implements hook_theme_registry_alter().
 */
function storm_block_accordion_theme_registry_alter(&$theme_registry) {
  $module_path = \Drupal::service('extension.list.module')->getPath('storm_block_accordion');

  $base_hooks = [
    'field' => [
      'registry' => 'field__block_content__field_accordion_items__accordion',
      'template' => 'field--block-content--field-accordion-items--accordion',
30.03.2021
subentity 1.x-dev :: subentity.module
/**
 * Implements hook_theme_registry_alter().
 */
function subentity_theme_registry_alter(array &$theme_registry): void {
  $entity_types = \Drupal::entityTypeManager()->getDefinitions();
  foreach ($entity_types as $type_id => $type) {
    if (!is_subclass_of($type->get('class'), SubEntityBase::CLASS)) {
      continue;
    }
22.10.2020
tag_block_site_branding_switcher 8.x-1.1 :: tag_block_site_branding_switcher.module
/**
 * Implements hook_theme_registry_alter().
 */
function tag_block_site_branding_switcher_theme_registry_alter(&$theme_registry) {

  $active_theme = \Drupal::service('theme.manager')->getActiveTheme();
  // Check if file not exist in active theme.
  if (!file_exists($active_theme->getPath() . '/templates/block--system-branding-block.html.twig')) {
    // Check if theme has base theme to select the right overrided template.
    // Base theme stable is default core template.
05.01.2019
templating 8.x-2.0 :: templating.module
/**
 * Implements hook_theme_registry_alter().
 */
function templating_theme_registry_alter(&$theme_registry) {
    $theme = \Drupal::theme()->getActiveTheme();
    $config = \Drupal::config('system.theme');
    $default_theme =  $config->get('default');
    $current_theme =  $theme->getName();
    if($default_theme == $current_theme){
03.06.2024
theme_region_wrapper 1.0.x-dev :: theme_region_wrapper.module
/**
 * Implements hook_theme_registry_alter().
 */
function theme_region_wrapper_theme_registry_alter(array &$theme_registry):void {
  // Only override the region template if it came from core. Allow themes that
  // have overridden the region template to take precedence.
  if (strpos($theme_registry['region']['path'], 'core') !== 0) {
    return;
  }
  $module_path = \Drupal::service('extension.list.module')->getPath('theme_region_wrapper');
24.06.2024
toolbar_plus 1.0.x-dev :: toolbar_plus.module
/**
 * Implements hook_theme_registry_alter().
 */
function toolbar_plus_theme_registry_alter(&$theme_registry) {
  $path = Drupal::service('module_handler')->getModule('toolbar_plus')->getPath();
  $theme_registry['top_bar']['path'] = "$path/templates";
}

/**
 * Implements hook_preprocess_HOOK().
05.09.2020
translators 8.x-1.x-dev :: modules/translators_content/translators_content.module
/**
 * Implements hook_theme_registry_alter().
 */
function translators_content_theme_registry_alter(&$theme_registry) {
  // Specify the path for the template of views_ui_expose_filter_form.
  $path = \Drupal::service('extension.list.module')->getPath('translators_content') . '/templates';
  $theme_registry['views_ui_expose_filter_form']['path'] = $path;
}

/**

Pages

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc