forum_entity_type_build

forum_entity_type_build(array &$entity_types)

Implements hook_entity_type_build().

File

core/modules/forum/forum.module, line 106
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}');
}
doc_Drupal
2016-10-29 09:17:17
Comments
Leave a Comment

Please login to continue.