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

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.

Activity

  1. dmitrii-fediuk commented on Oct 26, 2015

    @dmitrii-fediuk
    Author

    My workaround solution: https://mage2.pro/t/148
    It is not perfect because it overrides a core class, but I have not found a more proper solution.

  2. andimov commented on Aug 2, 2016

    @andimov
    Contributor

    @mage2pro

    Please, format this issue according to the Issue reporting guidelines

  3. andimov commented on Aug 16, 2016

    @andimov
    Contributor

    According to contributor guide, tickets without response for two weeks should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions