function sheetnode_get_sheetfields in Sheetnode 7
Same name and namespace in other branches
- 6 sheetnode.module \sheetnode_get_sheetfields()
- 7.2 sheetnode.module \sheetnode_get_sheetfields()
API function to get all sheetfields of a node type.
5 calls to sheetnode_get_sheetfields()
- sheetnode_find_sheet in ./
sheetnode.module - API function to return a sheet given a name.
- sheetnode_node_update_index in ./
sheetnode.module - Implements hook_node_update_index().
- sheetnode_phpexcel_node_view in modules/
sheetnode_phpexcel/ sheetnode_phpexcel.module - Implements hook_node_view().
- sheetnode_tokens_alter in ./
sheetnode.module - Implements hook_tokens_alter().
- _sheetnode_phpexcel_export in modules/
sheetnode_phpexcel/ sheetnode_phpexcel.export.inc - Helper function to export a node using PHPExcel.
File
- ./
sheetnode.module, line 1234 - Module file for the sheetnode module.
Code
function sheetnode_get_sheetfields($type) {
$sheetfields = array();
$instances = field_info_instances('node', $type);
$fields = field_info_fields();
foreach ($instances as $field_name => $instance) {
if ($fields[$field_name]['type'] === 'sheetfield') {
$sheetfields[$field_name] = $fields[$field_name];
$sheetfields[$field_name]['instance'] = $instance;
}
}
return $sheetfields;
}