You can do it by specifing a class
for the column:
An example of class declaration:
The class should implement the \Magento\Ui\Component\Listing\Columns\ColumnInterface
The \Magento\Ui\Component\Listing\Columns\ColumnInterface
inherits from the \Magento\Framework\View\Element\UiComponentInterface
, which has the getName()
method:
By default the \Magento\Ui\Component\Listing\Columns\ColumnInterface
is implemented by the ancestors of the \Magento\Ui\Component\Listing\Columns\Column
class
It has the following getName()
method implementation:
So it just returns a value of the name
attribute, for example:
If you create a custom getName()
method implementation, you will get a custom name for a backend grid column.