function _book_install_type_create

7.x book.install _book_install_type_create()
6.x book.install _book_install_type_create()
2 calls to _book_install_type_create()
book_install in drupal-6.x/modules/book/book.install
Implementation of hook_install().
book_update_6000 in drupal-6.x/modules/book/book.install
Drupal 5.x to 6.x update.

File

drupal-6.x/modules/book/book.install, line 24

Code

function _book_install_type_create() {
  // Create an additional node type
  $book_node_type = array(
    'type' => 'book',
    'name' => t('Book page'),
    'module' => 'node',
    'description' => t('A <em>book page</em> is a page of content, organized into a collection of related entries collectively known as a <em>book</em>. A <em>book page</em> automatically displays links to adjacent pages, providing a simple navigation system for organizing and reviewing structured content.'),
    'custom' => TRUE,
    'modified' => TRUE,
    'locked' => FALSE,
  );

  $book_node_type = (object) _node_type_set_defaults($book_node_type);
  node_type_save($book_node_type);
  // Default to not promoted.
  variable_set('node_options_book', array('status'));
  // Use this default type for adding content to books.
  variable_set('book_allowed_types', array('book'));
  variable_set('book_child_type', 'book');
}