function forum_entity_type_build

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

Implements hook_entity_type_build().

File

core/modules/forum/forum.module, line 121

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}');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.