function nodereference_deploy_get_nodereference_fields in Deploy - Content Staging 6
Get an array listing the names of all nodereference fields.
Return value
Array of all created nodereference fields
2 calls to nodereference_deploy_get_nodereference_fields()
- nodereference_node_deploy in modules/
nodereference_deploy/ nodereference_deploy.module - Implementation of hook_node_deploy(),
- nodereference_node_deploy_check in modules/
nodereference_deploy/ nodereference_deploy.module - Implementation of hook_node_deploy_check().
File
- modules/
nodereference_deploy/ nodereference_deploy.module, line 117 - Deployment module for nodereferences
Code
function nodereference_deploy_get_nodereference_fields() {
// This isn't changing much, so cache it to save some queries
static $nodereference_fields = array();
if (empty($nodereference_fields)) {
$fields = content_fields();
foreach ($fields as $name => $field) {
if ($field['type'] == 'nodereference') {
$nodereference_fields[$name] = $name;
}
}
}
return $nodereference_fields;
}