You are here

function appointment_calendar_add_custom_fields in Appointment Calendar 7

Adds fields in content type.

1 call to appointment_calendar_add_custom_fields()
appointment_calendar_install in ./appointment_calendar.install
Implements hook_install().

File

./appointment_calendar.install, line 95
Install and uninstall functions for the Appointment Calendar module.

Code

function appointment_calendar_add_custom_fields() {
  foreach (appointment_calendar_productcustomtype_installed_fields() as $field) {
    field_create_field($field);
  }
  foreach (appointment_calendar_productcustomtype_installed_instances() as $fieldinstance) {
    $fieldinstance['entity_type'] = 'node';
    $fieldinstance['bundle'] = 'appointment_calendar';
    field_create_instance($fieldinstance);
  }
}