wetboew_webform_example-1.0.x-dev/wetboew_webform_example.install

wetboew_webform_example.install
<?php

/**
 * @file
 * Install, update and uninstall functions for the WetBoew Webform Example module.
 */

/**
 * Implements hook_install().
 */
function wetboew_webform_example_install() {
  \Drupal::messenger()->addStatus(__FUNCTION__);
}

/**
 * Implements hook_uninstall().
 */
function wetboew_webform_example_uninstall() {
  \Drupal::messenger()->addStatus(__FUNCTION__);
}


/**
 * Implements hook_requirements().
 */
function wetboew_webform_example_requirements($phase) {
  $requirements = [];

  switch ($phase) {
    // Called while the module is installed.
    case 'install':
    // Called during regular use of the website.
    case 'runtime':
    // Called while the update.php is being executed.
    case 'update':
      // Do not allow administrators to install the module if conflicting module
      // is already installed.
      //
      // You can move this code to any other phase as well.
      if (\Drupal::moduleHandler()->moduleExists('clientside_validation_jquery')) {
        $requirements[] = [
          'title' => t('WetBoew Webform Example'),
          'value' => t('Clientside Validation jQuery'),
          'description' => t('Explain that administrators need to uninstall the clientside_validation_jquery module before proceeding.'),
          'severity' => REQUIREMENT_ERROR,
        ];
      }
      break;
  }

  return $requirements;
}

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

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