function og_views_plugin_argument_validate_og_group_types::validate_form in Organic groups 6
Same name and namespace in other branches
- 6.2 modules/og_views/includes/og_views_plugin_argument_validate_og_group_types.inc \og_views_plugin_argument_validate_og_group_types::validate_form()
File
- modules/
og_views/ includes/ og_views_plugin_argument_validate_og_group_types.inc, line 9
Class
- og_views_plugin_argument_validate_og_group_types
- Validate whether an argument is a group node. Borrows heavily form the Node argument validator.
Code
function validate_form(&$form, &$form_state) {
$form['validate_argument_nid_type'] = array(
'#type' => 'select',
'#title' => t('Argument type'),
'#options' => array(
'nid' => t('Node ID'),
'nids' => t("Node ID's separated by , or +"),
),
'#default_value' => isset($this->argument->options['validate_argument_nid_type']) ? $this->argument->options['validate_argument_nid_type'] : 'nid',
'#process' => array(
'views_process_dependency',
),
'#dependency' => array(
'edit-options-validate-type' => array(
$this->id,
),
),
);
$form['validate_argument_is_member'] = array(
'#type' => 'checkbox',
'#title' => t('Validate current user is a member of a specified group'),
'#default_value' => !empty($this->argument->options['validate_argument_is_member']),
'#process' => array(
'views_process_dependency',
),
'#dependency' => array(
'edit-options-validate-type' => array(
$this->id,
),
),
);
}