field_behaviors_widget
function field_behaviors_widget
field_behaviors_widget($op, $instance)
Determines the behavior of a widget with respect to an operation.
Parameters
$op: The name of the operation. Currently supported: 'default value', 'multiple values'.
$instance: The field instance array.
Return value
One of these values:
- FIELD_BEHAVIOR_NONE: Do nothing for this operation.
- FIELD_BEHAVIOR_CUSTOM: Use the widget's callback function.
- FIELD_BEHAVIOR_DEFAULT: Use field.module default behavior.
Related topics
File
- modules/field/field.info.inc, line 317
- Field Info API, providing information about available fields and field types.
Code
function field_behaviors_widget($op, $instance) { $info = field_info_widget_types($instance['widget']['type']); return isset($info['behaviors'][$op]) ? $info['behaviors'][$op] : FIELD_BEHAVIOR_DEFAULT; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!field.info.inc/function/field_behaviors_widget/7.x