zoomapi.install in Zoom API 8
Same filename and directory in other branches
Install, update, and uninstall functions for the Zoom API module.
File
zoomapi.installView 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
Name | Description |
---|---|
zoomapi_requirements | Implements hook_requirements(). |