function forum_entity_type_build

forum_entity_type_build(array &$entity_types)

Implements hook_entity_type_build().

File

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

Code

function forum_entity_type_build(array &$entity_types) {
  /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
  // 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}');
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!forum!forum.module/function/forum_entity_type_build/8.1.x