function _book_install_type_create in Coder 7.2
Same name and namespace in other branches
- 7 coder_upgrade/tests/old/samples/example.module \_book_install_type_create()
This would be in an .install file.
The function name is not a hook. The function call to node_type_save is the only thing to rely on. Use the parser parent and container properties to find the function?
File
- coder_upgrade/
tests/ old/ samples/ example.module, line 2218
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');
}