| 7 block_example.module | block_example_block_configure($delta = '') |
| 8 block_example.module | block_example_block_configure($delta = '') |
Implements hook_block_configure().
This hook declares configuration options for blocks provided by this module.
Related topics
File
- block_example/
block_example.module, line 90 - Module file for block_example.
Code
function block_example_block_configure($delta = '') {
// The $delta parameter tells us which block is being configured.
// In this example, we'll allow the administrator to customize
// the text of the 'configurable text string' block defined in this module.
$form = array();
if ($delta == 'example_configurable_text') {
// All we need to provide is the specific configuration options for our
// block. Drupal will take care of the standard block configuration options
// (block title, page visibility, etc.) and the save button.
$form['block_example_string'] = array(
'#type' => 'textfield',
'#title' => t('Block contents'),
'#size' => 60,
'#description' => t('This text will appear in the example block.'),
'#default_value' => variable_get('block_example_string', t('Some example content.')),
);
}
return $form;
}
Login or register to post comments