Question

I've been trying to create my own EAV entity CRUD module for Magento2.
As inspiration I took the product entity.
I'm at the add/edit form step and I'm looking at the product_form.xml ui component from the catalog module.
I don't want to blindly copy/paste/replace everything, so I'm curious to what this setting does:

<item name="childrenFromMeta" xsi:type="boolean">true</item>

I've also seen it in the category form and product attribute add form, but I didn't find anything related to it in the code.

Was it helpful?

Solution

For the research that i have done, i think this is a element that is no longer in use. It has three uses in the code as of 2.1.3:

module-catalog/view/adminhtml/ui_component/product_attribute_add_form.xml
  30: <item name="childrenFromMeta" xsi:type="boolean">true</item>

module-catalog/view/adminhtml/ui_component/product_form.xml
  24: <item name="childrenFromMeta" xsi:type="boolean">true</item>

module-google-optimizer/view/adminhtml/ui_component/new_category_form.xml
  10: <item name="childrenFromMeta" xsi:type="boolean">true</item>

But you might notice there is no view model that also has this value. Now, not all elements have a direct usage in the code, but it's the first hint that this was once used and is no longer there.

Digging a little deeper, i found this commit: https://github.com/magento/magento2/commit/288f9a2af104c67ffe6eba3ffef98e39c7b9acc9

Which shows the assigning of the value const CHILDREN_FROM_META = 'childrenFromMeta' in lib/internal/Magento/Framework/View/Element/UiComponentFactory.php

But if you look at this file now, that has since been removed. I'm sure if we dug into the file, we could find out what this originally did, but at this point i think we are safe to say that this is not longer in use and should have been deleted.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top