social_user.api.php in Open Social 8.3
Same filename and directory in other branches
- 8.9 modules/social_features/social_user/social_user.api.php
- 8.2 modules/social_features/social_user/social_user.api.php
- 8.4 modules/social_features/social_user/social_user.api.php
- 8.5 modules/social_features/social_user/social_user.api.php
- 8.6 modules/social_features/social_user/social_user.api.php
- 8.7 modules/social_features/social_user/social_user.api.php
- 8.8 modules/social_features/social_user/social_user.api.php
- 10.3.x modules/social_features/social_user/social_user.api.php
- 10.0.x modules/social_features/social_user/social_user.api.php
- 10.1.x modules/social_features/social_user/social_user.api.php
- 10.2.x modules/social_features/social_user/social_user.api.php
Hooks provided by the Social_user module.
File
modules/social_features/social_user/social_user.api.phpView source
<?php
/**
* @file
* Hooks provided by the Social_user module.
*/
use Drupal\Core\Url;
/**
* @addtogroup hooks
* @{
*/
/**
* Provide a method to create additional items from the user menu.
*
* @return array
* An associative array of items from profile section of user menu. The keys
* of array elements are keys of menu items.
* Each array elements should have the following records:
* - title: The text of menu item.
* - url: Url object for a URL that has a Drupal route.
* - after: Existing element after which will be added new item.
* - divider: (optional) "before" for set divider over item and "after" for
* set divider under item.
*
* @ingroup social_user_api
*/
function hook_social_user_account_header_links() {
return [
'logout' => [
'title' => t('Delete account'),
'url' => Url::fromRoute('entity.user.cancel_form', [
'user' => \Drupal::currentUser(),
]),
'after' => 'edit_profile',
'divider' => 'after',
],
];
}
/**
* @} End of "addtogroup hooks".
*/
Functions
Name | Description |
---|---|
hook_social_user_account_header_links | Provide a method to create additional items from the user menu. |