function block_configuration_action in Configuration Management 6
Map actions callback to determine which actions need executing for this data
1 string reference to 'block_configuration_action'
- block_configuration_maps in modules/
block.inc - This hook is used to return the configuration maps that describes how to configure this module given the supplied dataset
File
- modules/
block.inc, line 109
Code
function block_configuration_action(&$data, &$context) {
// If only "info" was supplied for an existing block,
// get the delta so we don't try and make a new one
if ($data['module'] == 'block' && !$data['delta'] && $data['info']) {
if ($delta = db_result(db_query('SELECT delta FROM {blocks} bl INNER JOIN {boxes} bo ON bl.delta = bo.bid AND bl.module = "block" WHERE info = "%s"', $data['info']))) {
$data['delta'] = $delta;
}
}
if ($context->action == 'delete') {
return 'block_box_delete';
}
else {
if ($data['module'] == 'block' && !$data['delta'] && $data['info']) {
return array(
'block_add_block_form',
'block_admin_display_form',
);
}
else {
return array(
'block_admin_configure',
'block_admin_display_form',
);
}
}
}