You are here

function social_follow_taxonomy_social_user_account_header_account_links in Open Social 10.3.x

Same name and namespace in other branches
  1. 10.0.x modules/social_features/social_follow_taxonomy/social_follow_taxonomy.module \social_follow_taxonomy_social_user_account_header_account_links()
  2. 10.1.x modules/social_features/social_follow_taxonomy/social_follow_taxonomy.module \social_follow_taxonomy_social_user_account_header_account_links()
  3. 10.2.x modules/social_features/social_follow_taxonomy/social_follow_taxonomy.module \social_follow_taxonomy_social_user_account_header_account_links()

Implements hook_social_user_account_header_account_links().

Adds the "Following tags" link to the user menu.

File

modules/social_features/social_follow_taxonomy/social_follow_taxonomy.module, line 42
Contains social_follow_taxonomy.module.

Code

function social_follow_taxonomy_social_user_account_header_account_links(array $context) {
  return [
    'my_tags' => [
      '#type' => 'link',
      '#attributes' => [
        'title' => new TranslatableMarkup("View tags I'm following"),
      ],
      '#title' => new TranslatableMarkup('Following tags'),
      '#weight' => 1001,
    ] + Url::fromRoute('view.following_tags.following_tags')
      ->toRenderArray(),
  ];
}