1 node_type_example.install | node_type_example_install() |
Implements hook_install().
File
- modules/
examples/ node_type_example/ node_type_example.install, line 10 - Install, update and uninstall functions for the node_example module.
Code
function node_type_example_install() {
$node_content_type = (object) array(
'type' => 'node_type_example',
'name' => t('Example content type'),
'base' => 'node_content',
'description' => t('This is an example content type with a few fields.'),
'custom' => 1,
'modified' => 1,
'locked' => 0,
'is_new' => TRUE,
'settings' => array(
'promote_enabled' => FALSE,
),
);
node_type_save($content_type);
node_add_body_field($content_type);
}