class SocialUserSearchContentBlockAlter 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
- 10.1.x modules/social_features/social_user/src/SocialUserSearchContentBlockAlter.php \Drupal\social_user\SocialUserSearchContentBlockAlter
- 10.2.x modules/social_features/social_user/src/SocialUserSearchContentBlockAlter.php \Drupal\social_user\SocialUserSearchContentBlockAlter
Provides a trusted callback to alter the system branding block.
Hierarchy
- class \Drupal\social_user\SocialUserSearchContentBlockAlter implements TrustedCallbackInterface
Expanded class hierarchy of SocialUserSearchContentBlockAlter
See also
social_user_block_view_search_content_block_alter()
1 file declares its use of SocialUserSearchContentBlockAlter
- social_user.module in modules/
social_features/ social_user/ social_user.module - The social user module alterations.
File
- modules/
social_features/ social_user/ src/ SocialUserSearchContentBlockAlter.php, line 12
Namespace
Drupal\social_userView source
class SocialUserSearchContentBlockAlter implements TrustedCallbackInterface {
/**
* Pre render for the search content in the header. This will add javascript.
*/
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;
}
/**
* {@inheritdoc}
*/
public static function trustedCallbacks() {
return [
'preRender',
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SocialUserSearchContentBlockAlter:: |
public static | function | Pre render for the search content in the header. This will add javascript. | |
SocialUserSearchContentBlockAlter:: |
public static | function |
Lists the trusted callbacks provided by the implementing class. Overrides TrustedCallbackInterface:: |
|
TrustedCallbackInterface:: |
constant | Untrusted callbacks throw exceptions. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger silenced E_USER_DEPRECATION errors. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger E_USER_WARNING errors. |