node_get_types
- 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.
- admin_menu_adjust_items in contributions/admin_menu/admin_menu.inc
- Add some hard-coded features for better user experience.
- apachesolr_node_to_document in contributions/apachesolr/apachesolr.index.inc
- Given a node ID, return a document representing that node.
- apachesolr_search_get_type in contributions/apachesolr/apachesolr_search.module
- Callback function for the 'Filter by type' facet block.
- apachesolr_search_type_boost_form in contributions/apachesolr/apachesolr_search.admin.inc
- Form builder function to set query type weights.
- blogapi_admin_settings in 5/modules/blogapi/blogapi.module
- blog_form in 5/modules/blog/blog.module
- Implementation of hook_form().
- book_form in 5/modules/book/book.module
- Implementation of hook_form().
- book_help in 5/modules/book/book.module
- Implementation of hook_help().
- calais_admin_settings_submit in contributions/opencalais/calais.admin.inc
- Have to override so that we can manage vocabulary - node_type relationships.
- calais_build_nodetype_settings in contributions/opencalais/calais.admin.inc
- Build the node type settings form for Calais integration.
- calais_bulk_process in contributions/opencalais/calais.admin.inc
- Build the administration page for submitting all nodes of a specific Content Types to Calais.
- calendar_get_nodes in contributions/calendar/calendar.module
- The workhorse function that takes the beginning array of items and alters it
to an array of calendar nodes that the theme can handle.
- calendar_node_stripe in contributions/calendar/calendar.module
- create a stripe id from a combination of the field and content types
and store value for legend
formula tries to create a unique id for each possible combination
- contemplate_admin in contributions/contemplate/contemplate.module
- Admin page... list out the node types
- contemplate_delete_type_form_submit in contributions/contemplate/contemplate.module
- contemplate_edit_type in contributions/contemplate/contemplate.module
- content_copy_export in contributions/cck/content_copy.module
- Process the export, get field admin forms for all requested fields
and save the form values as formatted text.
- content_copy_export_form in contributions/cck/content_copy.module
- A form to export field definitions.
- content_copy_import_form in contributions/cck/content_copy.module
- A form to import formatted text created with export.
- content_copy_import_form_submit in contributions/cck/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 contributions/cck/content.module
- Implementation of hook_menu().
- content_patterns in contributions/patterns/components/content.inc
- content_update_1009 in contributions/cck/content.install
- Index the 'nid' column on data tables to optimize node deletion.
Large tables might deserve a multipass update.
- custom_breadcrumbs_form in contributions/custom_breadcrumbs/custom_breadcrumbs.module
- date_tools_copy_import_event_form in contributions/date/date_tools/date_tools.module
- Event import form.
- date_tools_copy_type_form in contributions/date/date_tools/date_tools.module
- A form to select a content type.
- date_tools_page in contributions/date/date_tools/date_tools.module
- Main Date Tools page
- date_tools_wizard_build in contributions/date/date_tools/date_tools.module
- date_tools_wizard_create_ical_feed in contributions/date/date_tools/date_tools.module
- devel_generate_content_form in contributions/devel/devel_generate.module
- devel_node_access_block in contributions/devel/devel_node_access.module
- diggthis_admin_settings in contributions/diggthis/diggthis.module
- admin settings for the diggthis module
- domain_advanced in contributions/domain/domain_admin.inc
- Advanced node-type settings
- domain_content_form in contributions/domain/domain_content/domain_content.module
- Rewrites node_admin_nodes() to use db_rewrite_sql().
- emimport_import in contributions/emfield/contrib/emimport/emimport.module
- emimport_menu in contributions/emfield/contrib/emimport/emimport.module
- Implement hook_menu
- event_page in contributions/event/event.module
- Displays a page containing event information. The page layout defaults to a
graphical calendar.
- event_type_filter_form in contributions/event/event.module
- Builds the form array for the content type input control.
- event_uninstall in contributions/event/event.install
- Implementation of hook_uninstall().
- faq_form in contributions/faq/faq.module
- Defines the form where new questions and answers are written.
- feedapi_get_types in contributions/feedapi/feedapi.module
- Return a list of FeedAPI-enabled content-types list, ready-to-use for #options at FormsAPI
- feedapi_node_feedapi_settings_form in contributions/feedapi/feedapi_node/feedapi_node.module
- Implementation of hook_feedapi_settings_form().
If a module provides parsers and processors it MUST evaluate the $type variable
to return different forms for parsers and processors.
There might be a better term for parsers and processors than $type.
- feedapi_uninstall in contributions/feedapi/feedapi.install
- Implementation of hook_uninstall().
- file_import_form in contributions/file_import/file_import.module
- fivestar_link in contributions/fivestar/fivestar.module
- Implementation of hook_link()
- fivestar_update_2 in contributions/fivestar/fivestar.install
- Convert previous fivestar widget settings to new format.
- flag_form in contributions/flag/flag.module
- Add/Edit flag page.
- forum_form in 5/modules/forum/forum.module
- Implementation of hook_form().
- forward_link in contributions/forward/forward.module
- Generate links for pages
- gmap_location_admin_settings in contributions/gmap/gmap_location.module
- Admin Settings Page
- gmap_location_block in contributions/gmap/gmap_location.module
- Draw block of location for current node.
- hook_form in documentation/hooks/node.php
- Display a node editing form.
- hook_search in documentation/hooks/core.php
- Define a custom search routine.
- image_form in contributions/image/image.module
- Implementation of hook_form
- install_profile_wizard_form in contributions/install_profile_api/install_profile_wizard/install_profile_wizard.module
- install_profile_wizard_form_submit in contributions/install_profile_api/install_profile_wizard/install_profile_wizard.module
- mollom_protectable_forms in contributions/mollom/mollom.module
- This function lists all the forms that you can protect with Mollom.
If you want to protect additional forms with Mollom add the form ID
to this list.
- nodefamily_admin in contributions/nodefamily/nodefamily.module
- nodefamily_ct_relation_overview in contributions/nodefamily/nodefamily.module
- Display the existing content type relations in a table.
- nodefamily_lonely_node_page_args in contributions/nodefamily/nodefamily.module
- Provide a unique URL for adding/editing nodes of types
with a maximum population of one.
- nodefamily_uninstall in contributions/nodefamily/nodefamily.install
- nodefamily_update_1 in contributions/nodefamily/nodefamily.install
- Rename variables: nodefamily_typename_max -> nodefamily_max_typename.
- nodefamily_views_tables in contributions/nodefamily/nodefamily.module
- nodeprofile_get_types in contributions/nodeprofile/nodeprofile.module
- Builds a list of available content types that are marked as nodeprofiles,
and returns an array of nodeprofile content types in the specified format.
- nodeprofile_keep_relation in contributions/nodeprofile/nodeprofile.module
- Menu callback.
Hooks into admin/content/nodefamily/usernode which is normally handled by
the nodefamily module, but gets special handling here for relations that
may not be deleted.
- nodeprofile_menu in contributions/nodeprofile/nodeprofile.module
- Implementation of hook_menu().
- nodeprofile_uninstall in contributions/nodeprofile/nodeprofile.install
- nodeprofile_user in contributions/nodeprofile/nodeprofile.module
- Implementation of hook_user():
Delete the profile node when the user is deleted.
- nodereference_field_settings in contributions/cck/nodereference.module
- Implementation of hook_field_settings().
- node_access in 5/modules/node/node.module
- Determine whether the current user may perform the given operation on the
specified node.
- node_add in 5/modules/node/node.module
- Present a node submission form or a set of links to such forms.
- node_admin_nodes in 5/modules/node/node.module
- node_content_form in 5/modules/node/node.module
- Implementation of hook_form().
- node_example_form in documentation/examples/node_example.module
- Implementation of hook_form().
- node_filters in 5/modules/node/node.module
- List node administration filters that can be applied.
- node_forms in 5/modules/node/node.module
- Implementation of hook_forms(). All node forms share the same form handler
- node_form_alter in 5/modules/node/node.module
- Implementation of hook_form_alter().
- node_form_submit in 5/modules/node/node.module
- node_help in 5/modules/node/node.module
- Implementation of hook_help().
- node_hook in 5/modules/node/node.module
- Determine whether a node hook exists.
- node_invoke in 5/modules/node/node.module
- Invoke a node hook.
- node_menu in 5/modules/node/node.module
- Implementation of hook_menu().
- node_overview_types in 5/modules/node/content_types.inc
- Displays the content type admin overview page.
- node_pathauto in contributions/pathauto/pathauto_node.inc
- Implementation of hook_pathauto().
- node_pathauto_bulkupdate in contributions/pathauto/pathauto_node.inc
- Generate aliases for all nodes without aliases.
- node_perm in 5/modules/node/node.module
- Implementation of hook_perm().
- node_preview in 5/modules/node/node.module
- Generate a node preview.
- node_search in 5/modules/node/node.module
- Implementation of hook_search().
- node_token_values in contributions/token/token_node.inc
- Implementation of hook_token_values()
- node_types_rebuild in 5/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 5/modules/node/node.module
- Deletes a node type from the database.
- node_type_form_validate in 5/modules/node/content_types.inc
- Implementation of hook_form_validate().
- node_validate in 5/modules/node/node.module
- Perform validation checks on the given node.
- og_admin_settings in contributions/og/og.module
- og_form_add_og_audience in contributions/og/og.module
- Helper method to add OG audience fields to a given form. This is
lives in a separate function from og_form_alter() so it can be shared
by other OG contrib modules.
- og_mail in contributions/og/og.module
- Send this node/comment via email to all email members. Called from og_nodeapi() and og_comment().
Sometimes called from during cron if job_queue.module is enabled (recommended).
TODO: this function is a bit messy. rethink.
- og_og_create_links in contributions/og/og.module
- og_requirements in contributions/og/og.module
- og_views_tables in contributions/og/og_views.inc
- pageroute_page_add_ui in contributions/pageroute/pageroute_pages.inc
- pageroute_page_edit_ui in contributions/pageroute/pageroute_pages.inc
- pageroute_page_manage_ui in contributions/pageroute/pageroute_pages.inc
- poll_form in 5/modules/poll/poll.module
- Implementation of hook_form().
- project_issue_menu in contributions/project_issue/project_issue.module
- project_issue_pick_project_page in contributions/project_issue/issue.inc
- project_release_menu in contributions/project/release/project_release.module
- Implementation of hook_menu()
- service_links_admin_settings in contributions/service_links/service_links.module
- Implementation of hook_settings().
- subscriptions_content_form_alter in contributions/subscriptions/subscriptions_content.module
- Implementation of hook_form_alter()
- subscriptions_content_mailkeys in contributions/subscriptions/subscriptions_content.module
- Provide mailkeys for mail_edit. Implementation of hook_mailkeys().
- subscriptions_content_type_form in contributions/subscriptions/subscriptions_content.module
- Build the Content Types subscriptions form at user/UID/subscriptions/type.
- system_theme_settings in 5/modules/system/system.module
- Menu callback; display theme configuration for entire site and individual themes.
- system_update_119 in 5/modules/system/system.install
- system_update_179 in 5/modules/system/system.install
- Update base paths for relative URLs in custom blocks, profiles and various variables.
- taxonomy_form_vocabulary in 5/modules/taxonomy/taxonomy.module
- Display form for adding and editing vocabularies.
- taxonomy_image_link_alter_form in contributions/taxonomy_image/contributed/taxonomy_image_link_alter/taxonomy_image_link_alter.module
- taxonomy_image_node_display_form in contributions/taxonomy_image/contributed/taxonomy_image_node_display/taxonomy_image_node_display.module
- taxonomy_overview_vocabularies in 5/modules/taxonomy/taxonomy.module
- List and manage vocabularies.
- teleport_settings_form in contributions/teleport/teleport.module
- Returns the settings form.
- theme_apachesolr_breadcrumb_type in contributions/apachesolr/apachesolr_search.module
- Return the human readable text for a content type.
- theme_get_settings in 5/includes/theme.inc
- Retrieve an associative array containing the settings for a theme.
- theme_views_fastsearch_display in contributions/views_fastsearch/views_fastsearch.module
- trackback_uninstall in contributions/trackback/trackback.install
- Implementation of hook_uninstall().
- tracker_page in 5/modules/tracker/tracker.module
- Menu callback. Prints a listing of active nodes on the site.
- translation_admin_nodes in contributions/i18n/translation/translation.module
- Form builder. Administrative form for node translations
- uc_product_class_delete_confirm_submit in contributions/ubercart/uc_product/uc_product.module
- Submit handler for uc_product_class_delete_confirm.
- uc_product_disable in contributions/ubercart/uc_product/uc_product.module
- uc_product_enable in contributions/ubercart/uc_product/uc_product.module
- Implementation of hook_enable().
- uc_product_form in contributions/ubercart/uc_product/uc_product.module
- Implementation of hook_form().
- uc_product_kit_disable in contributions/ubercart/uc_product_kit/uc_product_kit.module
- uc_product_kit_enable in contributions/ubercart/uc_product_kit/uc_product_kit.module
- uc_product_perm in contributions/ubercart/uc_product/uc_product.module
- Implementation of hook_perm().
- vfs_ranking_nodetype_settings_form in contributions/views_fastsearch/contrib/vfs_ranking_nodetype/vfs_ranking_nodetype.module
- weblinks_form in contributions/weblinks/weblinks.module
- Implementation of hook_form().
- _blogapi_get_node_types in 5/modules/blogapi/blogapi.module
- _editablefields_entry_form in contributions/editablefields/editablefields.module
- _event_block_upcoming in contributions/event/event.module
- Helper function for upcoming events block. Can be called by other modules.
See also
event_block_upcoming
- _nodeprofile_node_delete in contributions/nodeprofile/nodeprofile.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…
- _subscriptions_content_node_options in contributions/subscriptions/subscriptions_content.module
- Implementation of hook_node_options(), subhook of hook_subscriptions().
- _teleport_matches_nodes in contributions/teleport/teleport.module
- Searches nodes.
- _xmlsitemap_node_excludes in contributions/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module
- Get array of excluded types.
- _xmlsitemap_node_gsitemap_replace in contributions/xmlsitemap/xmlsitemap_node/xmlsitemap_node.install
- Transfer data from Google Sitemap if it is installed.
Code
5/modules/node/node.module, line 266
<?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 $_node_types[$type];
case 'module':
return $_node_types[$type]->module;
case 'names':
return $_node_names;
case 'name':
return $_node_names[$type];
}
}
?>