You are here

function forum_uri in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/forum/forum.module \forum_uri()
  2. 7 modules/forum/forum.module \forum_uri()
  3. 9 core/modules/forum/forum.module \forum_uri()

Entity URI callback used in forum_entity_bundle_info_alter().

1 call to forum_uri()
template_preprocess_forum_list in core/modules/forum/forum.module
Prepares variables for forum list templates.
1 string reference to 'forum_uri'
forum_entity_bundle_info_alter in core/modules/forum/forum.module
Implements hook_entity_bundle_info_alter().

File

core/modules/forum/forum.module, line 133
Provides discussion forums.

Code

function forum_uri($forum) {
  return Url::fromRoute('forum.page', [
    'taxonomy_term' => $forum
      ->id(),
  ]);
}