You are here

function _social_user_search_content_pre_render in Open Social 8.4

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_user/social_user.module \_social_user_search_content_pre_render()
  2. 8 modules/social_features/social_user/social_user.module \_social_user_search_content_pre_render()
  3. 8.2 modules/social_features/social_user/social_user.module \_social_user_search_content_pre_render()
  4. 8.3 modules/social_features/social_user/social_user.module \_social_user_search_content_pre_render()
  5. 8.5 modules/social_features/social_user/social_user.module \_social_user_search_content_pre_render()
  6. 8.6 modules/social_features/social_user/social_user.module \_social_user_search_content_pre_render()
  7. 8.7 modules/social_features/social_user/social_user.module \_social_user_search_content_pre_render()
  8. 8.8 modules/social_features/social_user/social_user.module \_social_user_search_content_pre_render()

Pre render for the search content in the header. This will add javascript.

Parameters

array $build: The render build array.

Return value

array Attached array with javascript.

1 string reference to '_social_user_search_content_pre_render'
social_user_block_view_search_content_block_alter in modules/social_features/social_user/social_user.module
Implements hook_block_view_BASE_BLOCK_ID_alter().

File

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

Code

function _social_user_search_content_pre_render(array $build) {

  // Attach the social_search library defined in social_search.libraries.yml.
  $build['#attached'] = [
    'library' => [
      'social_search/navbar-search',
    ],
  ];
  return $build;
}