You are here

function forum_entity_type_build in Drupal 10

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

Implements hook_entity_type_build().

File

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

Code

function forum_entity_type_build(array &$entity_types) {

  /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */

  // Register forum specific forms.
  $entity_types['taxonomy_term']
    ->setFormClass('forum', 'Drupal\\forum\\Form\\ForumForm')
    ->setFormClass('container', 'Drupal\\forum\\Form\\ContainerForm')
    ->setLinkTemplate('forum-edit-container-form', '/admin/structure/forum/edit/container/{taxonomy_term}')
    ->setLinkTemplate('forum-delete-form', '/admin/structure/forum/delete/forum/{taxonomy_term}')
    ->setLinkTemplate('forum-edit-form', '/admin/structure/forum/edit/forum/{taxonomy_term}');
}