function block_box_form in Block Cache Alter 6
Same name in this branch
- 6 patches/block_with_node_grants.module \block_box_form()
- 6 patches/block_no_node_grants.module \block_box_form()
Define the custom block form.
2 calls to block_box_form()
- block_block in patches/
block_with_node_grants.module - Implementation of hook_block().
- block_block in patches/
block_no_node_grants.module - Implementation of hook_block().
File
- patches/
block_no_node_grants.module, line 344 - Controls the boxes that are displayed around the main content.
Code
function block_box_form($edit = array()) {
$edit += array(
'info' => '',
'body' => '',
);
$form['info'] = array(
'#type' => 'textfield',
'#title' => t('Block description'),
'#default_value' => $edit['info'],
'#maxlength' => 64,
'#description' => t('A brief description of your block. Used on the <a href="@overview">block overview page</a>.', array(
'@overview' => url('admin/build/block'),
)),
'#required' => TRUE,
'#weight' => -19,
);
$form['body_field']['#weight'] = -17;
$form['body_field']['body'] = array(
'#type' => 'textarea',
'#title' => t('Block body'),
'#default_value' => $edit['body'],
'#rows' => 15,
'#description' => t('The content of the block as shown to the user.'),
'#weight' => -17,
);
if (!isset($edit['format'])) {
$edit['format'] = FILTER_FORMAT_DEFAULT;
}
$form['body_field']['format'] = filter_form($edit['format'], -16);
return $form;
}