function bat_event_update_7102 in Booking and Availability Management Tools for Drupal 7
Generate machine names for the existing states.
File
- modules/
bat_event/ bat_event.install, line 348 - Sets up the base table for our entity and a table to store information about the entity types.
Code
function bat_event_update_7102() {
foreach (bat_event_get_states() as $state) {
$state['machine_name'] = $state['event_type'] . '_' . $state['id'];
bat_event_save_state($state, $state['event_type']);
}
}