function _value_is_disabled_options_passthrough in Value is 7
Helper to determine if there's nothing to do in this element. Depends on:
- #value_callback must be mine
- element must NOT already be (fully) #disabled
- some #disabled_options or #hidden_options must exist
2 calls to _value_is_disabled_options_passthrough()
- _value_is_disabled_options_state in ./
value_is.module - Helper to save unchangeable checkboxes state and alter $element.
- _value_is_disabled_options_value_callback in ./
value_is.module - Value callback for checkboxes elements.
File
- ./
value_is.module, line 102 - All the element validators for #element_validate.
Code
function _value_is_disabled_options_passthrough($element) {
$good_value_callback = $element['#value_callback'] == '_value_is_disabled_options_value_callback';
$disabled = !empty($element['#disabled']);
$no_config = empty($element['#disabled_options']) && empty($element['#hidden_options']);
return !($good_value_callback && !$disabled && !$no_config);
}