1 book.install _book_install_type_create()

Creates the book content type.

File

core/modules/book/book.install, line 29
Install, update and uninstall functions for the book module.

Code

function _book_install_type_create() {
  // Create an additional node type.
  $book_node_type = array(
    'type' => 'book',
    'name' => t('Book page'),
    'base' => 'node_content',
    'description' => t('<em>Books</em> have a built-in hierarchical navigation. Use for handbooks or tutorials.'),
    'custom' => 1,
    'modified' => 1,
    'locked' => 0,
    'is_new' => TRUE,
    'settings' => array(
      'promote_enabled' => FALSE,
    ),
  );

  $book_node_type = node_type_set_defaults($book_node_type);
  node_type_save($book_node_type);
  node_add_body_field($book_node_type);
}