You are here

zoomapi.install in Zoom API 8

Same filename and directory in other branches
  1. 7.2 zoomapi.install
  2. 7 zoomapi.install
  3. 2.0.x zoomapi.install

Install, update, and uninstall functions for the Zoom API module.

File

zoomapi.install
View source
<?php

/**
 * @file
 * Install, update, and uninstall functions for the Zoom API module.
 */
use Drupal\Core\Url;

/**
 * Implements hook_requirements().
 */
function zoomapi_requirements($phase) {
  $requirements = [];
  if ($phase == 'runtime') {
    $client = \Drupal::service('zoomapi.client');
    $credentials_are_valid = $client
      ->validateConfiguration();
    if (!$credentials_are_valid) {
      $link_to_settings = Url::fromRoute('zoomapi.settings')
        ->toString();
      $message = t('Missing valid configuration for Zoom API. Please go <a href=":link_to_settings">here</a> to set.', [
        ':link_to_settings' => $link_to_settings,
      ]);
      $requirements['zoomapi'] = [
        'title' => t('Zoom API - Configuration'),
        'severity' => REQUIREMENT_ERROR,
        'description' => $message,
      ];
    }
  }
  return $requirements;
}

Functions

Namesort descending Description
zoomapi_requirements Implements hook_requirements().