You are here

function userreference_deploy_get_userreference_fields in Deploy - Content Staging 6

Get an array listing the names of all userreference fields.

Return value

Array of all created userreference fields

2 calls to userreference_deploy_get_userreference_fields()
userreference_deploy_node_deploy_check in modules/userreference_deploy/userreference_deploy.module
Implementation of hook_node_deploy_check().
userreference_node_deploy in modules/userreference_deploy/userreference_deploy.module
Implementation of hook_node_deploy(),

File

modules/userreference_deploy/userreference_deploy.module, line 114
Deployment module for userreferences

Code

function userreference_deploy_get_userreference_fields() {

  // This isn't changing much, so cache it to save some queries
  static $userreference_fields = array();
  if (empty($userreference_fields)) {
    $fields = content_fields();
    foreach (content_fields() as $name => $field) {
      if ($field['type'] == 'userreference') {
        $userreference_fields[$name] = $field['widget']['type'];
      }
    }
  }
  return $userreference_fields;
}