function social_gdpr_social_user_account_header_links in Open Social 8.3
Same name and namespace in other branches
- 8.9 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
- 8.2 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
- 8.4 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
- 8.5 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
- 8.6 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
- 8.7 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
- 8.8 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
- 10.3.x modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
- 10.0.x modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
- 10.1.x modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
- 10.2.x modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
Implements hook_social_user_account_header_links().
File
- modules/
custom/ social_gdpr/ social_gdpr.module, line 89 - Contains social_gdpr.module.
Code
function social_gdpr_social_user_account_header_links() {
$items = [];
if (\Drupal::service('data_policy.manager')
->needConsent()) {
$items['data_policy_agreement'] = [
'title' => t('Data policy agreement'),
'url' => Url::fromRoute('data_policy.data_policy.agreement'),
'after' => 'edit_profile',
'divider' => 'before',
];
}
return $items;
}