public function EntityReferenceAutofillInstanceBehavior::access in Entity reference autofill 7
Only show handler on supported widget types.
Overrides EntityReference_BehaviorHandler_Abstract::access
File
- plugins/
behavior/ EntityReferenceAutofillInstanceBehavior.class.php, line 87 - Entity reference behavior handler for autofill module.
Class
- EntityReferenceAutofillInstanceBehavior
- Class for handling module behavior.
Code
public function access($field, $instance) {
$is_single_value = $field['cardinality'] == 1;
$is_supported = $is_single_value && array_key_exists($instance['widget']['type'], _entityreference_autofill_supported_widgets());
return $is_supported;
}