vp-1.0.x-dev/modules/vp_graphql/vp_graphql.install

modules/vp_graphql/vp_graphql.install
<?php

/**
 * @file
 * Install, update and uninstall functions for the VP GraphQL module.
 */

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

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

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

  if ($phase == 'runtime') {
    $value = mt_rand(0, 100);
    $requirements['vp_graphql_status'] = [
      'title' => t('VP GraphQL status'),
      'value' => t('VP GraphQL value: @value', ['@value' => $value]),
      'severity' => $value > 50 ? REQUIREMENT_INFO : REQUIREMENT_WARNING,
    ];
  }

  return $requirements;
}

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

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