function me_plugin_argument_validate_me_alias::options_form in me aliases 8
Same name and namespace in other branches
- 7 includes/views/handlers/me_plugin_argument_validate_me_alias.inc \me_plugin_argument_validate_me_alias::options_form()
File
- includes/
views/ handlers/ me_plugin_argument_validate_me_alias.inc, line 16 - Argument validator to help validate the me alias. If the argument is 'me', other validators will most likely be useless at this point, so we provde the same functionality as the user validator.
Class
- me_plugin_argument_validate_me_alias
- Validate whether an argument is an acceptable me alias, and user name/uid.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['roles']['#dependency'] = array(
'edit-options-validate-options-me-restrict-roles' => array(
1,
),
);
$form['me_redirect'] = array(
'#type' => 'checkbox',
'#title' => t("Redirect to the users uid when '%me' is entered as an argument.", array(
'%me' => _me_get_me_alias(TRUE),
)),
'#description' => t("If selected, when a user enters '%me' for this argument, they will be redirected to the view with their user id inplace of '%me'.", array(
'%me' => _me_get_me_alias(TRUE),
)),
'#default_value' => !empty($this->argument->options['me_redirect']),
);
}