function merci_content_type_rules in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6
Loads MERCI rules for a content type.
Parameters
$content_type: The type to load.
Return value
An object of rules.
2 calls to merci_content_type_rules()
- merci_check_content_type_restrictions in ./
merci.module - merci_load_hours_of_operation in ./
merci.module - Builds an array representing the hours of operation for the facility.
File
- ./
merci.module, line 1226 - MERCI - Managed Equipment Reservation Checkout and Inventory
Code
function merci_content_type_rules($content_type) {
// Load default rules
$rules = merci_load_content_type_settings($content_type);
$rules->hours_mon = variable_get('merci_hours_mon', '');
$rules->hours_tue = variable_get('merci_hours_tue', '');
$rules->hours_wed = variable_get('merci_hours_wed', '');
$rules->hours_thu = variable_get('merci_hours_thu', '');
$rules->hours_fri = variable_get('merci_hours_fri', '');
$rules->hours_sat = variable_get('merci_hours_sat', '');
$rules->hours_sun = variable_get('merci_hours_sun', '');
// Allow any other modules (e.g. merci_rro) to change the rules
module_invoke_all('merci_rules_alter', $rules);
return $rules;
}