block_example_block_configure
- Versions
- 7
block_example_block_configure($delta = '')
Implementation of hook_block_configure().
This hook declares configuration options for blocks provided by this module.
Code
developer/examples/block_example.module, line 46
<?php
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 == '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 