You are here

function node_import_cck_fields in Node import 6

Returns a list of CCK fields.

Parameters

$type: Node import type.

$module: Support module.

$reset: Reset internal cache.

Return value

Array of CCK field definitions.

26 calls to node_import_cck_fields()
asin_node_import_fields in supported/amazon/asin.inc
Implementation of hook_node_import_fields().
content_taxonomy_node_import_fields in supported/content_taxonomy/content_taxonomy.inc
Implementation of hook_node_import_fields()
content_taxonomy_node_import_values_alter in supported/content_taxonomy/content_taxonomy.inc
Implementation of hook_node_import_values_alter()
date_node_import_fields in supported/date/date.inc
Implementation of hook_node_import_fields().
date_node_import_values_alter in supported/date/date.inc
Implementation of hook_node_import_values_alter().

... See full list

File

supported/cck/content.inc, line 23
Support file for contrib CCK module.

Code

function node_import_cck_fields($type, $module, $reset = FALSE) {
  static $fields;
  if (!isset($fields) || $reset) {
    $fields = array();
  }
  if (!isset($fields[$type])) {
    $fields[$type] = array();
    if (($node_type = node_import_type_is_node($type)) !== FALSE) {
      $node_info = content_types($node_type);
      foreach ($node_info['fields'] as $fieldname => $fieldinfo) {
        if (!isset($fields[$type][$fieldinfo['module']])) {
          $fields[$type][$fieldinfo['module']] = array();
        }
        $fields[$type][$fieldinfo['module']][$fieldname] = $fieldinfo;
      }
    }
  }
  if (!isset($fields[$type][$module])) {
    $fields[$type][$module] = array();
  }
  return $fields[$type][$module];
}