You are here

function computing_entity_info_alter in Drupal Computing 7.2

Implements hook_entity_info_alter(). This seems to be the correct way to set ['bundles'] for custom entity types. Although for "node.module", it's set directly in hook_entity_info().

File

./computing.entity.inc, line 80
Code for the entity. This does not allow UI to create Computing Record entities or Computing Application entities. It has to be done in program.

Code

function computing_entity_info_alter(&$entity_info) {
  foreach (computing_get_applications() as $application => $info) {
    $entity_info['computing_record']['bundles'][$application] = array(
      'label' => $info->label,
    );
  }
}