_book_install_type_create
function _book_install_type_create
_book_install_type_create()
Creates the book content type.
File
- modules/book/book.install, line 34
- 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, ); $book_node_type = node_type_set_defaults($book_node_type); node_type_save($book_node_type); node_add_body_field($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'); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!book!book.install/function/_book_install_type_create/7.x