function social_core_preprocess_breadcrumb in Open Social 10.0.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
- 8 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
- 8.2 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
- 8.3 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
- 8.4 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
- 8.5 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
- 8.6 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
- 8.7 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
- 8.8 modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
- 10.3.x modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
- 10.1.x modules/social_features/social_core/social_core.module \social_core_preprocess_breadcrumb()
- 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 519 - 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();
}