You are here

function social_core_preprocess_breadcrumb in Open Social 8.8

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
  2. 8 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
  3. 8.2 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
  4. 8.3 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
  5. 8.4 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
  6. 8.5 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
  7. 8.6 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
  8. 8.7 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
  9. 10.3.x modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
  10. 10.0.x modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
  11. 10.1.x modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
  12. 10.2.x modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()

Implements hook_preprocess().

File

modules/social_features/social_core/social_core.module, line 384
The Social core module.

Code

function social_core_preprocess_breadcrumb(&$variables) {

  // Get the user.
  $user = \Drupal::currentUser();

  // Add cache tag for the user.
  $variables['#cache']['tags'][] = 'user:breadcrumb:' . $user
    ->id();
}