block_box_form

  1. drupal
    1. 4.7
    2. 5 block.module
    3. 6 block.module
Versions
4.7 – 6 block_box_form($edit = array())

▾ 2 functions call block_box_form()

block_block in modules/block.module
Implementation of hook_block().
block_box_add in modules/block.module
Menu callback; displays the block creation form.

Code

modules/block.module, line 505

<?php
function block_box_form($edit = array()) {
  $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/block'))), 
    '#required' => TRUE, 
    '#weight' => -19,
  );
  $form['title'] = array(
    '#type' => 'textfield', 
    '#title' => t('Block title'), 
    '#default_value' => $edit['title'], 
    '#maxlength' => 64, 
    '#description' => t('The title of the block as shown to the user.'), 
    '#weight' => -18,
  );
  $form['body_filter']['#weight'] = -17;
  $form['body_filter']['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,
  );
  $form['body_filter']['format'] = filter_form($edit['format'], -16);

  return $form;
}
?>