Method \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes::_getAdditionalElementTypes() allows an extension to add custom element types to admin product page by handling adminhtml_catalog_product_edit_element_types event:
|
$this->_eventManager->dispatch('adminhtml_catalog_product_edit_element_types', ['response' => $response]); |
A similar method for categories \Magento\Catalog\Block\Adminhtml\Category\Tab\Attributes::_getAdditionalElementTypes() needs to do so too.
|
protected function _getAdditionalElementTypes() |
|
{ |
|
return [ |
|
'image' => 'Magento\Catalog\Block\Adminhtml\Category\Helper\Image', |
|
'textarea' => 'Magento\Catalog\Block\Adminhtml\Helper\Form\Wysiwyg' |
|
]; |
|
} |
Now an extension can add custom element types to admin product page, but can not do so for admin category page.
Method
\Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes::_getAdditionalElementTypes()allows an extension to add custom element types to admin product page by handlingadminhtml_catalog_product_edit_element_typesevent:magento2/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php
Line 151 in 0be91a5
A similar method for categories \Magento\Catalog\Block\Adminhtml\Category\Tab\Attributes::_getAdditionalElementTypes() needs to do so too.
magento2/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php
Lines 124 to 130 in 0be91a5
Now an extension can add custom element types to admin product page, but can not do so for admin category page.