1 simpletest_example.install simpletest_example_install()

Implements hook_install().

Creates a 'simpletest_example' node type.

Related topics

File

modules/examples/simpletest_example/simpletest_example.install, line 14
Install, update and uninstall functions for the simpletest_example module.

Code

function simpletest_example_install() {
  $simpletest_example_node_type = array(
    'type' => 'simpletest_example',
    'name' => t('Simpletest Example Node Type'),
    'base' => 'node_content',
    'description' => t('simpletest_example page node type.'),
    'custom' => 1,
    'modified' => 1,
    'locked' => 0,
    'is_new' => TRUE,
    'settings' => array(
      'promote_enabled' => FALSE,
    ),
  );

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