function er_viewmode_supported_field_widget in Entity reference viewmode selector 7
Check if a field is supported by inline entity form view mode
Parameters
$field array - definition of a field:
Return value
bool - true if the given field is a supported field.
3 calls to er_viewmode_supported_field_widget()
- er_viewmode_field_formatter_settings_form in ./
er_viewmode.module - Implements hook_field_formatter_settings_form().
- er_viewmode_field_formatter_view in ./
er_viewmode.module - Implements hook_field_formatter_view().
- er_viewmode_field_widget_form_alter in ./
er_viewmode.module - Implements hook_field_widget_form_alter().
File
- ./
er_viewmode.module, line 73
Code
function er_viewmode_supported_field_widget($field) {
return $field['type'] == 'entityreference' && isset($field['settings']['handler_settings']['behaviors']['er_viewmode_behavior']) && $field['settings']['handler_settings']['behaviors']['er_viewmode_behavior']['status'] == 1;
}