QuestionQ33
Developing with AdminAn Adobe Commerce developer has successfully added a new column to the customers grid. The column’s data must be formatted before its content is displayed in the grid.
According to best practices, how should the developer add the custom logic to render the column?
- A
- Create an after plugin for Magento\Ui\Component\Listing\Columns\Column::prepareColumn().2. Add the custom logic within the afterPrepareColumn method.
- B
- Create a custom class extending Magento\Ui\Component\Listing\Columns\Column.2. Add the custom logic within the prepareDataSource method.3. Add an attribute class to the column node within the module's customer_listing.xml.
- C
- Override the Magento\Customer\Ui\Component\DataProvider class using a preference.2. Override the getData() method and add the custom logic per row.
Community Discussion