X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Finline_entity_form%2FREADME;fp=web%2Fmodules%2Fcontrib%2Finline_entity_form%2FREADME;h=c9e7a6e2af4ce19ef5219ac08a79b9805610ce85;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/modules/contrib/inline_entity_form/README b/web/modules/contrib/inline_entity_form/README new file mode 100644 index 000000000..c9e7a6e2a --- /dev/null +++ b/web/modules/contrib/inline_entity_form/README @@ -0,0 +1,40 @@ +Provides a widget for inline management (creation, modification, removal) of referenced entities. +The primary use case is the parent -> children one (product display -> products, order -> line items, etc.), +where the child entities are never managed outside the parent form. +Existing entities can also be referenced. + +Supports commerce_product_reference, commerce_line_item_reference and entityreference fields. +Requires integration code to be provided for each entity type that can be referenced. +Supports the commerce_product (including Commerce AutoSKU integraton), +commerce_line_item, node, taxonomy_term entity types out of the box. + +Getting started +--------------- +Edit the reference field for which you want to use this module +(for example, the Product field on a product display node, or the Line Items +one on commerce_order) and select one of the "Inline entity form" widgets. + +Widgets +------- +Two widgets are provided: +- "Inline entity form - Single value" - Shows the inline form in a fieldset +on the parent entity form. No additional action buttons are added. +This widget assumes that it is operating on a single-value required reference +field with one selected bundle. + +- "Inline entity form - Multiple values" - Shows an advanced widget +for inline management of entities. +Has optimal UX when there's only one bundle selected (this is the +"Product types that can be referenced" setting on product reference fields). + +Integrating with Inline Entity Form +----------------------------------- +An entity type can add support for this module by declaring the +inline entity form controller class in its entity info: + +$entity_info['commerce_line_item']['inline_form'] = array( + 'controller' => 'CommerceLineItemInlineEntityFormController', +); + +The controller needs to extend EntityInlineEntityFormController and at least +override entityForm() to provide a functioning entity form.