public static function SocialUserSearchContentBlockAlter::preRender in Open Social 10.3.x
Same name and namespace in other branches
- 10.0.x modules/social_features/social_user/src/SocialUserSearchContentBlockAlter.php \Drupal\social_user\SocialUserSearchContentBlockAlter::preRender()
- 10.1.x modules/social_features/social_user/src/SocialUserSearchContentBlockAlter.php \Drupal\social_user\SocialUserSearchContentBlockAlter::preRender()
- 10.2.x modules/social_features/social_user/src/SocialUserSearchContentBlockAlter.php \Drupal\social_user\SocialUserSearchContentBlockAlter::preRender()
Pre render for the search content in the header. This will add javascript.
File
- modules/
social_features/ social_user/ src/ SocialUserSearchContentBlockAlter.php, line 17
Class
- SocialUserSearchContentBlockAlter
- Provides a trusted callback to alter the system branding block.
Namespace
Drupal\social_userCode
public static function preRender($build) {
// Attach the social_search library defined in social_search.libraries.yml.
$build['#attached'] = [
'library' => [
'social_search/navbar-search',
],
];
return $build;
}