You are here

function social_gdpr_social_user_account_header_links in Open Social 8.9

Same name and namespace in other branches
  1. 8.2 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
  2. 8.3 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
  3. 8.4 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
  4. 8.5 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
  5. 8.6 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
  6. 8.7 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
  7. 8.8 modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
  8. 10.3.x modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
  9. 10.0.x modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
  10. 10.1.x modules/custom/social_gdpr/social_gdpr.module \social_gdpr_social_user_account_header_links()
  11. 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 93
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;
}