acquia_lift.install in Acquia Lift Connector 8
Same filename and directory in other branches
Installation file for Acquia Lift module.
File
acquia_lift.installView source
<?php
/**
* @file
* Installation file for Acquia Lift module.
*/
use Drupal\acquia_lift\Service\Helper\SettingsHelper;
use Drupal\Core\Url;
/**
* Implements hook_requirements().
*/
function acquia_lift_requirements($phase) {
$requirements = [];
if ($phase !== 'runtime') {
return $requirements;
}
$credentialSettings = \Drupal::config('acquia_lift.settings')
->get('credential');
if (!SettingsHelper::isInvalidCredential($credentialSettings)) {
return $requirements;
}
$requirements['acquia_lift_credential'] = [
'title' => t('Acquia Lift module'),
'description' => t('Acquia Lift module has not been fully configured yet. Please configure its settings from the <a href=":url">Acquia Lift settings page</a>.', [
':url' => Url::fromRoute('acquia_lift.admin_settings_form')
->toString(),
]),
'severity' => REQUIREMENT_WARNING,
'value' => t('Incomplete or invalid credential'),
];
return $requirements;
}
Functions
Name | Description |
---|---|
acquia_lift_requirements | Implements hook_requirements(). |