function multiblock_blockinfo_from_form in MultiBlock 7
Same name and namespace in other branches
- 5 multiblock.module \multiblock_blockinfo_from_form()
- 6 multiblock.module \multiblock_blockinfo_from_form()
Get the module and delta from the "Add Block Instance" block form element.
2 calls to multiblock_blockinfo_from_form()
- multiblock_add_form_submit in ./
multiblock.module - Add block instance to database from "Add Block Instance" form.
- multiblock_add_form_validate in ./
multiblock.module - Validate "Add Block Instance" form.
File
- ./
multiblock.module, line 373 - Enhances the block API, as provided by D7 Core.
Code
function multiblock_blockinfo_from_form($form_value) {
$matches = array();
preg_match('/^(.+)\\*\\*\\*MB\\*\\*\\*(.+)$/', $form_value, $matches);
return array(
'module' => $matches[1],
'delta' => $matches[2],
);
}