Commit 5ecb14ea authored by Philippe Mouchel's avatar Philippe Mouchel
Browse files

Add hook_env_conf_available_env_alter() implementation, to provide default environment

parent 1a61307a
<?php
/**
* @file
* Per-environment configuration module,
* callback functions for Per-environment configuration.
*/
/**
* Demo function: do nothing,
* should be remove by implementing hook_env_conf_available_env_alter()
*/
function _demo_env_conf() {
// here some code to execute
drupal_set_message(t('You should remove <strong>_demo_env_conf()</strong> function by implementing <strong>hook_env_conf_available_env_alter()</strong>.'), 'warning');
}
......@@ -30,3 +30,44 @@ function env_conf_menu() {
)
);
}
/**
* Implements hook_env_conf_available_env().
*/
function env_conf_env_conf_available_env() {
return array(
'local' => array(
'callbacks' => array(
'_demo_env_conf',
),
'include_file' => array(
'type' => 'inc',
'module' => 'env_conf',
'name' => 'env_conf.env_conf',
),
'weight' => 1,
),
'staging' => array(
'callbacks' => array(
'_demo_env_conf',
),
'include_file' => array(
'type' => 'inc',
'module' => 'env_conf',
'name' => 'env_conf.env_conf',
),
'weight' => 2,
),
'prod' => array(
'callbacks' => array(
'_demo_env_conf',
),
'include_file' => array(
'type' => 'inc',
'module' => 'env_conf',
'name' => 'env_conf.env_conf',
),
'weight' => 3,
),
);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment