I installed my “customsection_adminbackend” module which adds a new menu item in the Magento 2 backend.
For now in this new section there is only a text “Hello world”, but I would like to insert / install some custom attributes in this section of the backend.
What I would like to do is more or less this:
$myCustomSection->addAttribute(
MagentoCustomSectionAdminBackend::ENTITY, 'descCate1', [
'type' => 'text',
'label' => 'Descrizione categoria 1',
'input' => 'textarea',
'required' => false,
'wysiwyg_enabled' => true,
'sort_order' => 150,
'global' => MagentoEavModelEntityAttributeScopedAttributeInterface::SCOPE_STORE,
'group' => 'General Information',
'is_used_in_grid' => false,
'is_visible_in_grid' => false,
'is_filterable_in_grid' => false,
]
);
Finally I would like to be able to add the shop filter to my custom section of the backend.
I found this code but I don’t know where to put it:
<filters name="listing_filters">
<filterSelect name="store_id" provider="${ $.parentName }">
<settings>
<options class="MagentoStoreUiComponentListingColumnStoreOptions"/>
<caption translate="true">All Store Views</caption>
<label translate="true">Store View</label>
<dataScope>store_id</dataScope>
</settings>
</filterSelect>
</filters>
The final result I would like to see in my backend custom section is this:
How can I go about installing the two attributes and filter for store view in my custom module?