node_example_node_info

  1. drupal
    1. 4.7
    2. 5
    3. 6 node_example.module
Versions
4.7 – 6 node_example_node_info()

Implementation of hook_node_info(). This function replaces hook_node_name() and hook_node_types() from 4.6.

This is a required node hook. This function describes the nodes provided by this module. The name value provide a human readable name for the node while the base value tells Drupal how the module's functions map to hooks (i.e. if the base is node_example_foo then node_example_foo_insert will be called when inserting the node).

Code

developer/examples/node_example.module, line 55

<?php
function node_example_node_info() {
  return array('node_example' => array('name' => t('example node'), 'base' => 'node_example'));
}
?>