function masquerade_context_condition::options_form in Masquerade Extras 6.2
Same name and namespace in other branches
- 7.2 masquerade_context/plugins/condition/masquerade_context.inc \masquerade_context_condition::options_form()
- 7 masquerade_context/plugins/condition/masquerade_context.inc \masquerade_context_condition::options_form()
Exposes additonal configuration options for this plugin. @returns A form. @retval array
File
- masquerade_context/
plugins/ condition/ masquerade_context.inc, line 27 - Expose masquerade as a customizable context condition.
Class
- masquerade_context_condition
- @file Expose masquerade as a customizable context condition.
Code
function options_form($context) {
// Get the current settings from the context provided.
$defaults = $this
->fetch_from_context($context, 'options');
$form = array();
$form['mode'] = array(
'#title' => t('How should this condition be evaluated?'),
'#type' => 'checkboxes',
'#default_value' => !empty($defaults['mode']) ? $defaults['mode'] : array(
'is_masquerading' => 'is_masquerading',
),
'#options' => array(
'is_masquerading' => t('This user is posing as someone else.'),
'is_being_masqueraded' => t('Someone is posing as this user.'),
),
);
return $form;
}