node_list

Versions
4.6
node_list()

Get a list of all the defined node types.

Return value

A list of all node types.

▾ 11 functions call node_list()

block_admin_configure in modules/block.module
Menu callback; displays the block configuration form.
blogapi_settings in modules/blogapi.module
node_add in modules/node.module
Present a node submission form or a set of links to such forms.
node_admin_nodes in modules/node.module
Generate the content administration overview.
node_help in modules/node.module
Implementation of hook_help().
node_types_configure in modules/node.module
Menu callback; presents each node type configuration page.
system_theme_settings in modules/system.module
Menu callback; display theme configuration for entire site and individual themes.
taxonomy_form_vocabulary in modules/taxonomy.module
theme_get_settings in includes/theme.inc
Retrieve an associative array containing the settings for a theme.
update_119 in database/updates.inc
_blogapi_get_node_types in modules/blogapi.module

Code

modules/node.module, line 246

<?php
function node_list() {
  $types = array();
  foreach (module_list() as $module) {
    if (module_hook($module, 'node_name')) {
      $module_types = module_invoke($module, 'node_types');
      if (is_array($module_types)) {
        foreach ($module_types as $type) {
          $types[] = $type;
        }
      }
      else {
        $types[] = $module;
      }
    }
  }
  return $types;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.