You are here

function logged_in_block_configure in Util 7

Implementation of hook_block_configure(). Get the extra form elements for the block.

Parameters

$delta - integer for the block number.:

Return value

array containing the extra form elements for the block.

File

contribs/logged_in/logged_in.module, line 54
Adds a "Logged In As" block.

Code

function logged_in_block_configure($delta) {
  $form = array();
  $noyes = array(
    t('No'),
    t('Yes'),
  );
  switch ($delta) {
    case 'logged_in':
      $form['logged_in'] = array(
        '#type' => 'fieldset',
        '#collapsible' => TRUE,
        '#collapsed' => FALSE,
        '#title' => t('Logged In Display'),
        '#description' => t('Select the options for the display.'),
        '#prefix' => '<div id="logged-in-settings">',
        '#suffix' => '</div>',
      );
      $form['logged_in']['show_roles'] = array(
        '#type' => 'radios',
        '#options' => $noyes,
        '#title' => t('Show user roles'),
        '#default_value' => (int) variable_get('logged_in_show_roles', 0),
        '#attributes' => array(
          'class' => array(
            'container-inline',
          ),
        ),
      );
      $form['logged_in']['show_perms'] = array(
        '#type' => 'radios',
        '#options' => $noyes,
        '#title' => t('Show permissions'),
        '#description' => t('This can be a very lengthy list.'),
        '#default_value' => (int) variable_get('logged_in_show_perms', 0),
        '#attributes' => array(
          'class' => array(
            'container-inline',
          ),
        ),
      );
      break;
  }
  return $form;
}