function commerce_file_plugin_argument_validate_user::options_form in Commerce File 7
Provide the default form for setting options.
Overrides views_plugin_argument_validate_user::options_form
File
- views/
handlers/ commerce_file_plugin_argument_validate_user.inc, line 16 - Argument plugin for a valid user.
Class
- commerce_file_plugin_argument_validate_user
- Validate whether an argument is a valid user.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['restrict_roles']['#title'] = t('If the current user does not match the argument, validate the argument for users with specific roles.');
$form['roles'] = array(
'#type' => 'checkboxes',
'#title' => t('Grant access for the selected roles'),
'#description' => t('If no roles are selected, additional access will not be granted.'),
'#options' => array_map('check_plain', user_roles(TRUE)),
'#default_value' => $this->options['roles'],
'#process' => array(
'form_process_checkboxes',
'ctools_dependent_process',
),
'#dependency' => array(
'edit-options-validate-options-commerce-file-user-restrict-roles' => array(
1,
),
),
'#prefix' => '<div id="edit-options-validate-options-commerce-file-user-restrict-roles-wrapper">',
'#suffix' => '</div>',
);
}