You are here

function hook_gdpr_compliance_policy_alter in General Data Protection Regulation Compliance 8

Policy page alter hook.

Gives ability to alter the content and the context of the rendered page.

Parameters

string $policy: Raw content of the page.

string[] $context: Values that replace related tokens in the raw content. Array contains 'changed', 'mail', 'url' keys to alter.

1 invocation of hook_gdpr_compliance_policy_alter()
PagePolicy::page in src/Controller/PagePolicy.php
Constructs page from template.

File

./gdpr_compliance.api.php, line 24
Hooks provided by the GDPR compliance module.

Code

function hook_gdpr_compliance_policy_alter(&$policy, array &$context) {
  $context['mail'] = 'mail@example.org';
}