1 node_example.install node_example_install()

Implements hook_install().

File

modules/examples/node_example/node_example.install, line 11
Install, update and uninstall functions for the node_example module.

Code

function node_example_install() {
  $node_example_node_type = array(
    'type' => 'node_example',
    'name' => t('Example Node Type'),
    'base' => 'node_content',
    'description' => t('This is an example node type with a few fields.'),
    'custom' => 1,
    'modified' => 1,
    'locked' => 0,
    'is_new' => TRUE,
    'settings' => array(
      'promote_enabled' => FALSE,
    ),
  );

  $node_example_node_type = node_type_set_defaults($node_example_node_type);
  node_type_save($node_example_node_type);
  node_add_body_field($node_example_node_type);
}