book_entity_type_build

book_entity_type_build(array &$entity_types)

Implements hook_entity_type_build().

File

core/modules/book/book.module, line 80
Allows users to create and organize related content in an outline.

Code

function book_entity_type_build(array &$entity_types) {
  /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
  $entity_types['node']
  ->setFormClass('book_outline', 'Drupal\book\Form\BookOutlineForm')
    ->setLinkTemplate('book-outline-form', '/node/{node}/outline')
    ->setLinkTemplate('book-remove-form', '/node/{node}/outline/remove');
}
doc_Drupal
2016-10-29 08:48:36
Comments
Leave a Comment

Please login to continue.