You are here

function template_preprocess_account_header_links in Open Social 8

Same name and namespace in other branches
  1. 8.2 modules/social_features/social_user/social_user.module \template_preprocess_account_header_links()
  2. 8.3 modules/social_features/social_user/social_user.module \template_preprocess_account_header_links()

Prepares variables for the account header links.

Default template: account-header-links.html.twig.

Parameters

array $variables: An associative array containing:

  • links.

File

modules/social_features/social_user/social_user.module, line 239
The social user module alterations.

Code

function template_preprocess_account_header_links(array &$variables) {

  // Add the search content block to account_header_links.
  $block = Block::load('search_content_block_header');
  if (!empty($block)) {
    $block_output = \Drupal::entityManager()
      ->getViewBuilder('block')
      ->view($block);
    $variables['links']['search_block'] = $block_output;
  }
}