localgov_directories-3.3.1/modules/localgov_directories_page/localgov_directories_page.install

modules/localgov_directories_page/localgov_directories_page.install
<?php

/**
 * @file
 * Install, update and uninstall functions for the LocalGov Directories Page.
 */

/**
 * Implements hook_install().
 */
function localgov_directories_page_install($is_syncing): void {
  if ($is_syncing) {
    return;
  }

  // Install default config for simple_sitemap, as this does not appear to work
  // in the config/optional folder.
  // Discussed on https://www.drupal.org/project/simple_sitemap/issues/3156080
  if (\Drupal::moduleHandler()->moduleExists('simple_sitemap')) {
    $generator = \Drupal::service('simple_sitemap.entity_manager');
    $generator->setBundleSettings('node', 'localgov_directories_page', [
      'index' => TRUE,
      'priority' => '0.5',
    ]);
  }
}

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

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