gdpr.install in General Data Protection Regulation 7
Same filename and directory in other branches
Install file for the GDPR module.
File
gdpr.installView source
<?php
/**
* @file
* Install file for the GDPR module.
*/
/**
* Implements hook_requirements().
*/
function gdpr_requirements($phase) {
$requirements = [];
$t = get_t();
if ($phase === 'runtime' && ($definitions = checklistapi_get_checklist_info())) {
$id = 'gdpr_checklist';
if (isset($definitions[$id]) && ($checklist = checklistapi_checklist_load($id))) {
$percent = round($checklist
->getPercentComplete());
$requirements['gdpr_status'] = [
'title' => $t('GDPR Preparation'),
'value' => $t('Self assessment Checklist: <a href="@url">@percent% done</a>.', [
'@percent' => $percent,
'@url' => '/admin/config/gdpr/checklist',
]),
'severity' => REQUIREMENT_INFO,
];
}
}
return $requirements;
}
Functions
Name | Description |
---|---|
gdpr_requirements | Implements hook_requirements(). |