function context_condition_user::options_form in Context 7.3
Options form. Provide additional options for your condition.
Overrides context_condition::options_form
File
- plugins/
context_condition_user.inc, line 23
Class
- context_condition_user
- Expose current user role as a context condition.
Code
function options_form($context) {
$defaults = $this
->fetch_from_context($context, 'options');
return array(
'negate_role' => array(
'#title' => t('Make role a negative condition'),
'#type' => 'checkbox',
'#description' => t("Checking this box will make this condition fire if the user's role is NOT one of the role's checked"),
'#default_value' => isset($defaults['negate_role']) ? $defaults['negate_role'] : 0,
),
);
}