function _logged_in_block_configure in Util 6.2
Same name and namespace in other branches
- 6.3 contribs/logged_in/logged_in.module \_logged_in_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.
1 call to _logged_in_block_configure()
- logged_in_block in contribs/
logged_in/ logged_in.module - Implementation of hook_block().
File
- contribs/
logged_in/ logged_in.module, line 71 - Adds a "Logged In As" block.
Code
function _logged_in_block_configure($delta) {
drupal_add_css(drupal_get_path('module', 'logged_in') . '/logged_in.css');
$form = array();
$yesno = array(
1 => t('Yes'),
0 => t('No'),
);
switch ($delta) {
case 0:
$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' => $yesno,
'#title' => t('Show user roles'),
'#default_value' => (int) variable_get('logged_in_show_roles', 0),
'#suffix' => '<div class="clear-block"></div>',
);
$form['logged_in']['show_perms'] = array(
'#type' => 'radios',
'#options' => $yesno,
'#title' => t('Show permissions'),
'#description' => t('This can be a very lengthy list.'),
'#default_value' => (int) variable_get('logged_in_show_perms', 0),
);
break;
}
return $form;
}