localgov_guides-2.1.15/localgov_guides.install

localgov_guides.install
<?php

/**
 * @file
 * Install, update and uninstall functions for the LocalGov Guides module.
 */

/**
 * Implements hook_install().
 */
function localgov_guides_install($is_syncing) {
  if ($is_syncing) {
    return;
  }
  $services = \Drupal::moduleHandler()->moduleExists('localgov_services_navigation');
  $topics = \Drupal::moduleHandler()->moduleExists('localgov_topics');
  localgov_guides_optional_fields_settings($services, $topics);
  // Check if simple_sitemap module is installed.
  $simple_sitemap = \Drupal::moduleHandler()->moduleExists('simple_sitemap');
  if ($simple_sitemap) {
    // Install default config, as this does not appear to work in the
    // config/optional folder.
    $entity_manager = \Drupal::service('simple_sitemap.entity_manager');
    $entity_manager->setBundleSettings('node', 'localgov_guides_overview', [
      'index' => TRUE,
      'priority' => 0.5,
    ]);
    $entity_manager->setBundleSettings('node', 'localgov_guides_page', [
      'index' => TRUE,
      'priority' => 0.5,
    ]);
  }
}

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

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