You are here

function webform_node_types in Webform 7.4

Return all content type enabled with webform.

Return value

array An array of node type names.

8 calls to webform_node_types()
theme_webform_admin_content in includes/webform.admin.inc
Generate a list of all webforms available on this site.
webform_admin_type_list in includes/webform.admin.inc
Create a comma-separate list of content types that are webform enabled.
webform_block_info in ./webform.module
Implements hook_block_info().
webform_field_extra_fields in ./webform.module
Implements hook_field_extra_fields().
webform_handler_field_node_link_edit::render_link in views/webform_handler_field_node_link_edit.inc
Renders the link.

... See full list

3 string references to 'webform_node_types'
webform_install in ./webform.install
Implements hook_install().
webform_update_7412 in ./webform.install
Split webform_node_types as content type specific.
webform_variable_get in ./webform.module
Retrieve a Drupal variable with the appropriate default value.

File

./webform.module, line 1489
This module provides a simple way to create forms and questionnaires.

Code

function webform_node_types() {
  $types =& drupal_static(__FUNCTION__, NULL);
  if (!isset($types)) {
    $types = array();
    foreach (node_type_get_names() as $type => $name) {
      if (variable_get('webform_node_' . $type, FALSE)) {
        $types[] = $type;
      }
    }
  }
  return $types;
}