You are here

function _book_install_type_create in Drupal 6

Same name and namespace in other branches
  1. 7 modules/book/book.install \_book_install_type_create()
2 calls to _book_install_type_create()
book_install in modules/book/book.install
Implementation of hook_install().
book_update_6000 in modules/book/book.install
Drupal 5.x to 6.x update.

File

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');
}