mailjet-8.x-2.7/modules/mailjet_event/mailjet_event.install

modules/mailjet_event/mailjet_event.install
<?php

/**
 * @file
 * Install, update and uninstall functions for the Mailjet Event module.
 */

/**
 * Implements hook_requirements().
 */
function mailjet_event_requirements($phase) {
  $requirements = [];
  $config_mailjet = \Drupal::config('mailjet.settings');

  if ($phase == 'install') {
    $errorData = [
      'severity' => REQUIREMENT_ERROR,
      'description' => t('Event module requires the Mailjet module. Please enable first Mailjet module and enter Mailjet API KEYS.!'),
    ];

    if (empty($config_mailjet->get('mailjet_active')) && empty($config_mailjet->get('mailjet_username')) && empty($config_mailjet->get('mailjet_password'))) {
      $requirements['phpmailer'] = $errorData;

    }

  }
  return $requirements;
}

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

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