You are here

function merci_restrictions_enable in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3

Implements hook_enable().

File

merci_restrictions/merci_restrictions.install, line 54

Code

function merci_restrictions_enable() {
  $fields = merci_permissions_merci_fields_info();
  merci_core_create_field($fields[MERCI_ALLOWED_ROLES], 'merci_restrictions', 'merci_restrictions');
  $fields = merci_restrictions_merci_fields_info();
  foreach (array(
    MERCI_CHECKOUT_MAX_LENGTH,
    MERCI_CHECKOUT_OFFSITE,
  ) as $field_name) {
    merci_core_create_field($fields[$field_name], 'merci_restrictions', 'merci_restrictions');
  }
}