function context_condition_node::options_form in Context 6
Same name and namespace in other branches
- 6.3 plugins/context_condition_node.inc \context_condition_node::options_form()
- 7.3 plugins/context_condition_node.inc \context_condition_node::options_form()
Options form. Provide additional options for your condition.
Overrides context_condition::options_form
File
- plugins/
context_condition_node.inc, line 30
Class
- context_condition_node
- Expose node views/node forms of specific node types as a context condition.
Code
function options_form($context) {
$defaults = $this
->fetch_from_context($context, 'options');
return array(
'node_form' => array(
'#title' => t('Set on node form'),
'#type' => 'select',
'#options' => array(
CONTEXT_NODE_VIEW => t('No'),
CONTEXT_NODE_FORM => t('Yes'),
CONTEXT_NODE_FORM_ONLY => t('Only on node form'),
),
'#description' => t('Set this context on node forms'),
'#default_value' => isset($defaults['node_form']) ? $defaults['node_form'] : TRUE,
),
);
}