- 5 – 6
node_get_types($op = 'types', $node = NULL, $reset = FALSE)
Builds a list of available node types, and returns all of part of this list
in the specified format.
Parameters
$op
The format in which to return the list. When this is set to 'type',
'module', or 'name', only the specified node type is returned. When set to
'types' or 'names', all node types are returned.
$node
A node object, array, or string that indicates the node type to return.
Leave at default value (NULL) to return a list of all node types.
$reset
Whether or not to reset this function's internal cache (defaults to
FALSE).
Return value
Either an array of all available node types, or a single node type, in a
variable format. Returns FALSE if the node type is not found.
- apachesolr_node_to_document in contrib-6/apachesolr/apachesolr.index.inc
- Given a node ID, return a document representing that node.
- apachesolr_search_get_type in contrib-6/apachesolr/apachesolr_search.module
- Callback function for the 'Filter by type' facet block.
- apachesolr_search_type_boost_form in contrib-6/apachesolr/apachesolr_search.admin.inc
- Form builder function to set query type weights.
- auto_nodetitle_set_title in contrib-6/auto_nodetitle/auto_nodetitle.module
- Sets the automatically generated nodetitle for the node
- auto_nodetitle_uninstall in contrib-6/auto_nodetitle/auto_nodetitle.install
- Implementation of hook_uninstall().
- blogapi_admin_settings in drupal-6/modules/blogapi/blogapi.module
- blog_form in drupal-6/modules/blog/blog.module
- Implementation of hook_form().
- book_admin_settings in drupal-6/modules/book/book.admin.inc
- Builds and returns the book settings form.
- comment_update_6002 in drupal-6/modules/comment/comment.install
- Changed comment settings from global to per-node -- copy global
settings to all node types.
- content_content_extra_fields in contrib-6/cck/content.module
- Implementation of hook_content_extra_fields.
- content_copy_export in contrib-6/cck/modules/content_copy/content_copy.module
- Process the export, get field admin forms for all requested fields
and save the form values as formatted text.
- content_copy_import_form_submit in contrib-6/cck/modules/content_copy/content_copy.module
- Submit handler for import form.
For each submitted field:
1) add new field to the database
2) execute the imported field macro to update the settings to the imported values
- content_menu in contrib-6/cck/content.module
- Implementation of hook_menu().
- content_profile_action_load_label in contrib-6/content_profile/content_profile.rules.inc
- content_profile_get_types in contrib-6/content_profile/content_profile.module
- Builds a list of available content types that are marked as content_profiles,
and returns an array of content profile content types in the specified format.
- content_profile_install in contrib-6/content_profile/content_profile.install
- Implementation of hook_install().
- content_profile_preprocess_content_profile_display_view in contrib-6/content_profile/content_profile.theme.inc
- Implementation of content_profile_preprocess_HOOK()
- content_profile_uninstall in contrib-6/content_profile/content_profile.install
- Implementation of hook_uninstall().
- content_profile_update_6002 in contrib-6/content_profile/content_profile.install
- Make the profile type to be "custom", so it can be deleted.
- content_profile_update_6004 in contrib-6/content_profile/content_profile.install
- Due to an old bug it may be that the $settings of a content type
are '0'. As it should be an array this generates errors.
This update fixes up those scrambled settings.
- content_profile_user_has_profile_condition_label in contrib-6/content_profile/content_profile.rules.inc
- content_types_overview in contrib-6/cck/includes/content.admin.inc
- Menu callback; replacement for node_overview_types().
- content_type_create in contrib-6/cck/includes/content.crud.inc
- Make changes needed when a content type is created.
- content_uninstall in contrib-6/cck/content.install
- Implementation of hook_uninstall().
- ctools_context_create_node_add_form in contrib-6/ctools/plugins/contexts/node_add_form.inc
- It's important to remember that $conf is optional here, because contexts
are not always created from the UI.
- ctools_context_node_add_form_settings_form in contrib-6/ctools/plugins/contexts/node_add_form.inc
- ctools_node_body_content_type_render in contrib-6/ctools/plugins/content_types/node_context/node_body.inc
- Render the custom content type.
- ctools_node_title_content_type_render in contrib-6/ctools/plugins/content_types/node_context/node_title.inc
- Render the custom content type.
- ctools_node_type_ctools_access_settings in contrib-6/ctools/plugins/access/node_type.inc
- Settings form for the 'by node_type' access plugin
- ctools_node_type_ctools_access_summary in contrib-6/ctools/plugins/access/node_type.inc
- Provide a summary description based upon the checked node_types.
- ctools_node_type_desc_content_type_render in contrib-6/ctools/plugins/content_types/node_context/node_type_desc.inc
- Output function for the 'node' content type. Outputs a node
based on the module and delta supplied in the configuration.
- date_tools_copy_import_event_form in contrib-6/date/date_tools/date_tools.event.inc
- Event import form.
- date_tools_copy_type_form in contrib-6/date/date_tools/date_tools.event.inc
- A form to select a content type.
- date_tools_page in contrib-6/date/date_tools/date_tools.module
- Main Date Tools page
- date_tools_wizard_build in contrib-6/date/date_tools/date_tools.wizard.inc
- devel_generate_content_add_node in contrib-6/devel/devel_generate.inc
- Create one node. This is used by both the batch and non-batch branches of
the code.
- devel_generate_content_types in contrib-6/devel/devel_generate.inc
- devel_node_access_block in contrib-6/devel/devel_node_access.module
- domain_advanced_form in contrib-6/domain/domain.admin.inc
- Implement domain_advanced_form.
- domain_content_form in contrib-6/domain/domain_content/domain_content.admin.inc
- Rewrites node_admin_nodes() to use db_rewrite_sql().
- ec_product_admin_ptypes_form in contrib-6/ecommerce/ec_product/ec_product.admin.inc
- Add or Edit product type form.
Path: admin/ecsettings/products/types/add, admin/ecsettings/products/types/*
- ec_product_admin_ptypes_form_submit in contrib-6/ecommerce/ec_product/ec_product.admin.inc
- Submit product_admin_ptypes_form()
- ec_product_product_types in contrib-6/ecommerce/ec_product/ec_product.admin.inc
- Implementation of hook_product_types().
Which is also in the admin file.
- ec_product_ptypes_build in contrib-6/ecommerce/ec_product/ec_product.module
- Builds a list of available node types, by quering hook_product_info() in
all modules.
- ec_product_uninstall in contrib-6/ecommerce/ec_product/ec_product.install
- Implementation of hook_uninstall().
- ec_product_update_5403 in contrib-6/ecommerce/ec_product/ec_product.install
- All custom nodes are never converted to products by default.
We should invert all optional to never and never to optional
- fieldgroup_content_fieldgroup_content_type_admin_title in contrib-6/cck/modules/fieldgroup/panels/content_types/content_fieldgroup.inc
- Admin title for fieldgroup content type.
- fieldgroup_content_fieldgroup_content_type_content_types in contrib-6/cck/modules/fieldgroup/panels/content_types/content_fieldgroup.inc
- Return all fieldgroup content types available.
- fieldgroup_menu in contrib-6/cck/modules/fieldgroup/fieldgroup.module
- Implementation of hook_menu().
- flag_delete_confirm in contrib-6/flag/includes/flag.admin.inc
- Delete flag page.
- flag_form in contrib-6/flag/includes/flag.admin.inc
- Add/Edit flag page.
- forum_form in drupal-6/modules/forum/forum.module
- Implementation of hook_form().
- hook_form in docs-6/hooks/node.php
- Display a node editing form.
- hook_mail in docs-6/hooks/core.php
- Prepare a message based on parameters; called from drupal_mail().
- hook_search in docs-6/hooks/core.php
- Define a custom search routine.
- locale_uninstall in drupal-6/modules/locale/locale.install
- Implementation of hook_uninstall().
- locale_update_6005 in drupal-6/modules/locale/locale.install
- Change language setting variable of content types.
- nodereference_field_settings in contrib-6/cck/modules/nodereference/nodereference.module
- Implementation of hook_field_settings().
- node_access in drupal-6/modules/node/node.module
- Determine whether the current user may perform the given operation on the
specified node.
- node_add in drupal-6/modules/node/node.pages.inc
- Present a node submission form or a set of links to such forms.
- node_admin_nodes in drupal-6/modules/node/node.admin.inc
- Form builder: Builds the node administration overview.
- node_assign_owner_action in drupal-6/modules/node/node.module
- Implementation of a configurable Drupal action.
Assigns ownership of a node to a user.
- node_content_form in drupal-6/modules/node/node.module
- Implementation of hook_form().
- node_delete in drupal-6/modules/node/node.module
- Delete a node.
- node_example_form in contrib-6/examples/node_example/node_example.module
- Implementation of hook_form().
- node_features_export in contrib-6/features/includes/features.node.inc
- Implementation of hook_features_export.
- node_features_export_options in contrib-6/features/includes/features.node.inc
- Implementation of hook_features_export_options().
- node_features_export_render in contrib-6/features/includes/features.node.inc
- Implementation of hook_features_export_render().
- node_filters in drupal-6/modules/node/node.admin.inc
- List node administration filters that can be applied.
- node_forms in drupal-6/modules/node/node.module
- Implementation of hook_forms(). All node forms share the same form handler
- node_form_alter in drupal-6/modules/node/node.module
- Implementation of hook_form_alter().
- node_form_submit in drupal-6/modules/node/node.pages.inc
- node_help in drupal-6/modules/node/node.module
- Implementation of hook_help().
- node_hook in drupal-6/modules/node/node.module
- Determine whether a node hook exists.
- node_invoke in drupal-6/modules/node/node.module
- Invoke a node hook.
- node_make_sticky_action in drupal-6/modules/node/node.module
- Implementation of a Drupal action.
Sets the sticky-at-top-of-list property of a node to 1.
- node_make_unsticky_action in drupal-6/modules/node/node.module
- Implementation of a Drupal action.
Sets the sticky-at-top-of-list property of a node to 0.
- node_menu in drupal-6/modules/node/node.module
- Implementation of hook_menu().
- node_mollom_form_info in contrib-6/mollom/mollom.module
- Implements hook_mollom_form_info().
- node_mollom_form_list in contrib-6/mollom/mollom.module
- Implements hook_mollom_form_list().
- node_overview_types in drupal-6/modules/node/content_types.inc
- Displays the content type admin overview page.
- node_pathauto in contrib-6/pathauto/pathauto_node.inc
- Implements hook_pathauto().
- node_pathauto_bulkupdate in contrib-6/pathauto/pathauto_node.inc
- Generate aliases for all nodes without aliases.
- node_perm in drupal-6/modules/node/node.module
- Implementation of hook_perm().
- node_promote_action in drupal-6/modules/node/node.module
- Implementation of a Drupal action.
Sets the promote property of a node to 1.
- node_publish_action in drupal-6/modules/node/node.module
- Implementation of a Drupal action.
Sets the status of a node to 1, meaning published.
- node_revision_delete_confirm_submit in drupal-6/modules/node/node.pages.inc
- node_revision_revert_confirm_submit in drupal-6/modules/node/node.pages.inc
- node_save_action in drupal-6/modules/node/node.module
- Implementation of a Drupal action.
Saves a node.
- node_search in drupal-6/modules/node/node.module
- Implementation of hook_search().
- node_token_values in contrib-6/token/token_node.inc
- Implementation of hook_token_values().
- node_types_rebuild in drupal-6/modules/node/node.module
- Resets the database cache of node types, and saves all new or non-modified
module-defined node types to the database.
- node_type_delete in drupal-6/modules/node/node.module
- Deletes a node type from the database.
- node_type_form_validate in drupal-6/modules/node/content_types.inc
- Validates the content type submission form generated by node_type_form().
- node_unpromote_action in drupal-6/modules/node/node.module
- Implementation of a Drupal action.
Sets the promote property of a node to 0.
- node_unpublish_action in drupal-6/modules/node/node.module
- Implementation of a Drupal action.
Sets the status of a node to 0, meaning unpublished.
- node_unpublish_by_keyword_action in drupal-6/modules/node/node.module
- Implementation of a configurable Drupal action.
Unpublish a node if it contains a certain string.
- node_validate in drupal-6/modules/node/node.module
- Perform validation checks on the given node.
- og_admin_settings in contrib-6/og/includes/og.admin.inc
- Menu callback to load settings form.
- og_form_add_og_audience in contrib-6/og/og.module
- Helper method to add OG audience fields to a given form.
- og_get_types in contrib-6/og/og.module
- og_notifications_add_form in contrib-6/og/modules/og_notifications/og_notifications.pages.inc
- Grouptype subscription creation form.
- og_notifications_form_alter in contrib-6/og/modules/og_notifications/og_notifications.module
- Implementation of hook_form_alter().
- og_notifications_manage_form in contrib-6/og/modules/og_notifications/og_notifications.pages.inc
- Grouptype subscription management form.
- og_og_create_links in contrib-6/og/og.module
- og_requirements in contrib-6/og/og.install
- og_uninstall in contrib-6/og/og.install
- og_update_5701 in contrib-6/og/og.install
- Update variables to new content type system. Also rebuild node_access for new grants system.
- page_manager_node_add in contrib-6/ctools/page_manager/plugins/tasks/node_edit.inc
- Callback to handle the process of adding a node.
- page_manager_node_edit_menu_alter in contrib-6/ctools/page_manager/plugins/tasks/node_edit.inc
- Callback defined by page_manager_node_edit_page_manager_tasks().
- panels_node_form in contrib-6/panels/panels_node/panels_node.module
- Implementation of hook_form().
- panels_node_override_basic in contrib-6/panels/plugins/page_wizards/node_override.inc
- First page of our page creator wizard.
- poll_form in drupal-6/modules/poll/poll.module
- Implementation of hook_form().
- rules_action_add_node_form in contrib-6/rules/rules/modules/node.rules_forms.inc
- Action "Add a node" configuration form
- rules_action_callback_form in contrib-6/rules/rules/rules.api.php
- The configuration form callback for an action.
- rules_condition_content_is_type_form in contrib-6/rules/rules/modules/node.rules_forms.inc
- Condition: Check for content types - Configuration form
- rules_condition_content_is_type_label in contrib-6/rules/rules/modules/node.rules_forms.inc
- Some label callbacks for the conditions
- simpletest_example_form in contrib-6/examples/simpletest_example/simpletest_example.module
- Implementation of hook_form().
- subscriptions_content_form_subscriptions_settings_form_alter in contrib-6/subscriptions/subscriptions_content.module
- Implementation of hook_form_alter().
- subscriptions_content_mailkeys in contrib-6/subscriptions/subscriptions_content.module
- Implementation of hook_mailkeys().
- subscriptions_content_type_form in contrib-6/subscriptions/subscriptions_content.module
- Build the Content Types subscriptions form at user/UID/subscriptions/type.
- system_mail in drupal-6/modules/system/system.module
- Implementation of hook_mail().
- system_message_action in drupal-6/modules/system/system.module
- A configurable Drupal action. Sends a message to the current user's screen.
- system_theme_settings in drupal-6/modules/system/system.admin.inc
- Form builder; display theme configuration for entire site and individual themes.
- taxonomy_form_vocabulary in drupal-6/modules/taxonomy/taxonomy.admin.inc
- Display form for adding and editing vocabularies.
- taxonomy_overview_vocabularies in drupal-6/modules/taxonomy/taxonomy.admin.inc
- Form builder to list and manage vocabularies.
- template_preprocess_forums in drupal-6/modules/forum/forum.module
- Process variables for forums.tpl.php
- template_preprocess_views_view_row_search in contrib-6/views/modules/search.views.inc
- Template helper for theme_views_view_row_search
- theme_apachesolr_breadcrumb_type in contrib-6/apachesolr/apachesolr_search.module
- Return the human readable text for a content type.
- theme_content_profile_display_add_link in contrib-6/content_profile/content_profile.theme.inc
- Themes the add link.
- theme_content_profile_display_link in contrib-6/content_profile/content_profile.theme.inc
- Theme function for the content_profile display as link
- theme_get_settings in drupal-6/includes/theme.inc
- Retrieve an associative array containing the settings for a theme.
- tracker_page in drupal-6/modules/tracker/tracker.pages.inc
- Menu callback. Prints a listing of active nodes on the site.
- video_form in contrib-6/video/video.module
- Hook, displays the contents of the node form page for creating and editing nodes.
- _blogapi_get_node_types in drupal-6/modules/blogapi/blogapi.module
- _content_profile_node_delete in contrib-6/content_profile/content_profile.module
- The original node_delete() function uses node_load() to get the $node object.
Unfortunately, when a hook_user('delete') is called, node_load() doesn't
work anymore because the user has already been deleted, and node_load()
still expects...
- _content_type_info in contrib-6/cck/content.module
- Collate all information on content types, fields, and related structures.
- _devel_node_access_explain_access in contrib-6/devel/devel_node_access.module
- Helper function that mimicks node.module's node_access() function.
- _node_add_access in drupal-6/modules/node/node.module
- _subscriptions_content_node_options in contrib-6/subscriptions/subscriptions_content.module
- Implementation of hook_node_options(), subhook of hook_subscriptions().
Code
drupal-6/modules/node/node.module, line 418
<?php
function node_get_types($op = 'types', $node = NULL, $reset = FALSE) {
static $_node_types, $_node_names;
if ($reset || !isset($_node_types)) {
list($_node_types, $_node_names) = _node_types_build();
}
if ($node) {
if (is_array($node)) {
$type = $node['type'];
}
elseif (is_object($node)) {
$type = $node->type;
}
elseif (is_string($node)) {
$type = $node;
}
if (!isset($_node_types[$type])) {
return FALSE;
}
}
switch ($op) {
case 'types':
return $_node_types;
case 'type':
return isset($_node_types[$type]) ? $_node_types[$type] : FALSE;
case 'module':
return isset($_node_types[$type]->module) ? $_node_types[$type]->module : FALSE;
case 'names':
return $_node_names;
case 'name':
return isset($_node_names[$type]) ? $_node_names[$type] : FALSE;
}
}
?>