You are here

function _node_registration_bundles in Node registration 7

Returns all node registration bundles in the node_registration type.

2 calls to _node_registration_bundles()
node_registration_entity_info in includes/node_registration.entity.inc
Implements hook_entity_info().
node_registration_field_extra_fields in ./node_registration.module
Implements hook_field_extra_fields().

File

includes/node_registration.api.inc, line 11
Registration API functions.

Code

function _node_registration_bundles() {
  $bundles = _node_registration_node_types();
  $nodes = db_query('SELECT nid FROM {node_registration_node} WHERE private_fields <> 0');
  foreach ($nodes as $node) {
    $nid = $node->nid;
    $type = 'node_' . $nid;
    $name = 'Node # ' . $nid;
    $bundles[$type] = $name;
  }
  return $bundles;
}