Skip to content

Conversation

@Hanmac
Copy link
Contributor

@Hanmac Hanmac commented Dec 18, 2025

Description (*)

This adds some Events to the Adminhtml/Widget/Grid,
allowing it to add more Columns without the need to extend the Grid classes.

Example:

  • you can add a Join to another table in the set_collection Event
  • and then add Columns in the prepare_columns_after Event

Related Pull Requests

  • see OpenMage/magento-lts#<issue_number>

Fixed Issues (if relevant)

  • fixes OpenMage/magento-lts#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)

@github-actions github-actions bot added the Component: Adminhtml Relates to Mage_Adminhtml label Dec 18, 2025
@sreichel
Copy link
Contributor

How about using $_eventPrefix to access specific grids?

For _afterLoadCollection and _prepareColums we have to change some code to call parent method (instead of return $this).

@sreichel sreichel added this to the 20.18.0 milestone Dec 20, 2025
@github-actions github-actions bot added the Component: Index Relates to Mage_Index label Jan 5, 2026
@Hanmac
Copy link
Contributor Author

Hanmac commented Jan 5, 2026

@sreichel Block doesn't have $_eventPrefix (yet)
it is only defined for Core_Model_Abstract

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2026

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

Labels

Component: Adminhtml Relates to Mage_Adminhtml Component: Index Relates to Mage_Index

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants