function cumulus_get_config in Cumulus 7
Returns the configuration for the requested block delta.
Parameters
$delta: string The delta that uniquely identifies the block in the block system. If not specified, the default configuration will be returned.
Return value
array An associated array of configuration options.
6 calls to cumulus_get_config()
- cumulus_block_view in ./
cumulus.module - Implements hook_block_view().
- cumulus_configure_form in ./
cumulus.admin.inc - Implements hook_block_configure().
- cumulus_delete in ./
cumulus.admin.inc - Menu callback: confirm deletion of cumulus blocks.
- _cumulus_block_configure in ./
cumulus.admin.inc - Implements hook_block_configure().
- _cumulus_block_info in ./
cumulus.admin.inc - Implements hook_block_info().
File
- ./
cumulus.module, line 26 - The brain of Cumulus.
Code
function cumulus_get_config($delta = NULL) {
$config = cumulus_default_config();
$config['delta'] = $delta;
// Get the block configuration options.
if ($delta) {
static $blocks;
if (!isset($blocks)) {
$blocks = module_invoke_all('cumulus_blocks');
}
if (!empty($blocks[$delta])) {
// Merge the default values.
$config = $blocks[$delta] + $config;
// Set the delta.
$config['delta'] = $delta;
// Flag the block as exported.
$config['exported_to_code'] = TRUE;
}
foreach (array_keys(cumulus_default_config()) as $paramter) {
$config[$paramter] = cumulus_variable_get($paramter, $delta, $config[$paramter]);
}
}
return $config;
}