function flag_plugin_argument_validate_flaggability::_get_option in Flag 6.2
Same name and namespace in other branches
- 6 includes/flag_plugin_argument_validate_flaggability.inc \flag_plugin_argument_validate_flaggability::_get_option()
- 7.2 includes/flag_plugin_argument_validate_flaggability.inc \flag_plugin_argument_validate_flaggability::_get_option()
Returns an option's value.
Purpose: insulate us from the difference between Views 3 and Views 2.
3 calls to flag_plugin_argument_validate_flaggability::_get_option()
- flag_plugin_argument_validate_flaggability::get_flag in includes/
flag_plugin_argument_validate_flaggability.inc - flag_plugin_argument_validate_flaggability::options_form in includes/
flag_plugin_argument_validate_flaggability.inc - flag_plugin_argument_validate_flaggability::validate_argument in includes/
flag_plugin_argument_validate_flaggability.inc - Tests whether the argument is flaggable, or flagged, or flagged by current user. These are three possible tests, and which of the three to actually carry out is determined by 'flag_test'.
File
- includes/
flag_plugin_argument_validate_flaggability.inc, line 120 - Contains the flaggability validator handler.
Class
- flag_plugin_argument_validate_flaggability
- Validates whether an argument is a flaggable/flagged object.
Code
function _get_option($option, $default) {
if (_flag_is_views3()) {
return $this->options[$option];
}
else {
// Views 2.
//
// Validator arguments are stored in the argument object, not here.
$option = $this
->_option_name($option);
return isset($this->argument->options[$option]) ? $this->argument->options[$option] : $default;
}
}