- Issue created by @Anybody
- Merge request !142Implement inline_entity_form_sam_allowed_widget_types_alter and declare... → (Open) created by Anybody
https://www.drupal.org/project/sam → is part of Drupal CMS now.
Currently it does NOT support inline entity form, just the following widget types:
const SAM_ALLOWED_WIDGET_TYPES = [
'email_default',
'entity_reference_autocomplete',
'link_attributes',
'link_default',
'linkit',
'number',
'path',
'string_textarea',
'string_textfield',
'telephone',
'telephone_default',
'text_textarea',
'text_textarea_with_summary',
'text_textfield',
'uri',
];
For contrib modules, the SAM module has a hook to declare compatibility:
/**
* Allows modules to alter the list of supported widget types.
*
* Modules implementing this are responsible for ensuring that the way this
* module shows/hides new elements works well with their widget.
*
* @param array $widget_types
* An indexed array with supported widget machine names, to be modified by
* reference.
*/
function hook_sam_allowed_widget_types_alter(array &$widget_types) {
$widget_types[] = 'my_custom_widget';
}
We should declare support für SAM to make it IEF work with SAM in Drupal CMS.
It already works fine beside one issue I found: Empty entities (IEF lines) are not sorted out. We'll have to fix this by checking that empty entities are never saved, but I guess that might even be unrelated.
Active
3.0
Code