function crumbs_Admin_ElementObject_Abstract::value_callback in Crumbs, the Breadcrumbs suite 7.2
Parameters
array &$element: The form element.
bool $input:
array $form_state:
Return value
array|bool
3 methods override crumbs_Admin_ElementObject_Abstract::value_callback()
- crumbs_Admin_ElementObject_WeightsExpansible::value_callback in lib/
Admin/ ElementObject/ WeightsExpansible.php - Callback for $element['#value_callback']
- crumbs_Admin_ElementObject_WeightsTabledrag::value_callback in lib/
Admin/ ElementObject/ WeightsTabledrag.php - Callback for $element['#value_callback']
- crumbs_Admin_ElementObject_WeightsTextual::value_callback in lib/
Admin/ ElementObject/ WeightsTextual.php - Callback for $element['#value_callback']
File
- lib/
Admin/ ElementObject/ Abstract.php, line 20
Class
Code
function value_callback(&$element, $input = FALSE, $form_state = array()) {
// TODO: What is the correct "neutral" behavior of a validation callback?
if ($input === FALSE) {
return isset($element['#default_value']) ? $element['#default_value'] : array();
}
else {
return $input;
}
}