Skip to content

Inconsistency: \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes::_getAdditionalElementTypes() fires the event «adminhtml_catalog_product_edit_element_types» but \Magento\Catalog\Block\Adminhtml\Category\Tab\Attributes::_getAdditionalElementTypes() does not fire a similar event #2165

Closed
@dmitrii-fediuk

Description

@dmitrii-fediuk

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions