You are here

calendar_systems_date_properties.install in Calendar Systems 8

File

calendar_systems_date_properties/calendar_systems_date_properties.install
View source
<?php

/**
 * @return array
 */
function _calendar_systems_date_properties_variables() {
  return array(
    'calendar_systems_date_properties_entity_bundles_settings' => array(),
  );
}

/**
 * Implements hook_install().
 *
 */
function calendar_systems_date_properties_install() {
  _calendar_systems_date_properties_variables_set(_calendar_systems_date_properties_variables());
}

/**
 * Implements hook_uninstall().
 */
function calendar_systems_date_properties_uninstall() {
  module_load_include('module', 'calendar_systems_date_properties', 'calendar_systems_date_properties');
  _calendar_systems_date_properties_schema_apply_change(TRUE);
  _calendar_systems_date_properties_variables_del(_calendar_systems_date_properties_variables());
}
function _calendar_systems_date_properties_variables_set($variables) {
  foreach ($variables as $key => $val) {
    variable_set($key, $val);
  }
}
function _calendar_systems_date_properties_variables_del($variables) {
  $variables = array_keys($variables);
  foreach ($variables as $variable) {
    variable_del($variable);
  }
}