You are here

function sheetnode_get_sheetfields in Sheetnode 6

Same name and namespace in other branches
  1. 7.2 sheetnode.module \sheetnode_get_sheetfields()
  2. 7 sheetnode.module \sheetnode_get_sheetfields()

API function to get all sheetfields of a node type.

4 calls to sheetnode_get_sheetfields()
sheetnode_find_sheet in ./sheetnode.module
API function to return a sheet given a name.
sheetnode_nodeapi in ./sheetnode.module
Implementation of hook_nodeapi().
sheetnode_phpexcel_link in modules/sheetnode_phpexcel/sheetnode_phpexcel.module
Implementation of hook_link().
_sheetnode_phpexcel_export in modules/sheetnode_phpexcel/sheetnode_phpexcel.export.inc
Helper function to export a node using PHPExcel.

File

./sheetnode.module, line 1139

Code

function sheetnode_get_sheetfields($type) {
  if (!module_exists('content')) {
    return array();
  }
  $sheetfields = array();
  $type_info = content_types($type);
  foreach ($type_info['fields'] as $field_name => $field) {
    if ($field['type'] === 'sheetfield') {
      $sheetfields[$field_name] = $field;
    }
  }
  return $sheetfields;
}