function hook_inline_entity_form_settings_alter in Inline Entity Form 7
Perform alterations to the IEF field type settings.
This allows modules to enable IEF to work on custom field types.
Parameters
$settings: An array with the following keys:
- entity_type - The entity_type being managed.
- bundles - Bundles of entities that the user is allowed to create.
- column - The name of the ref. field column that stores the entity id.
$field: The field array of the reference field.
$instance: The instance array of the reference field.
1 invocation of hook_inline_entity_form_settings_alter()
- inline_entity_form_settings in ./
inline_entity_form.module - Introspects field and instance settings, and determines the correct settings for the functioning of the widget.
File
- ./
inline_entity_form.api.php, line 52 - Hooks provided by the Inline Entity Form module.
Code
function hook_inline_entity_form_settings_alter(&$settings, $field, $instance) {
if ($field['type'] == 'mycustom_reference') {
$settings['entity_type'] = 'mycustom';
$settings['column'] = 'mycustom_id';
}
}