function book_entity_type_build

Same name and namespace in other branches
  1. 10 core/modules/book/book.module \book_entity_type_build()
  2. 9 core/modules/book/book.module \book_entity_type_build()

Implements hook_entity_type_build().

File

core/modules/book/book.module, line 80

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')
    ->addConstraint('BookOutline', []);
}

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