block_box_form

Versions
4.6 – 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 504

<?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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.