PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 30, 2023
Let's talk code, commerce and open source.

DataColumn Type

The most basic column is DataColumn. It is used to display raw field data in Grid.

Available options

Properties Type Expected value
field string required The record field name that the column displays.

Example usage

use PrestaShop\PrestaShop\Core\Grid\Column\Type\DataColumn;
use PrestaShop\PrestaShop\Core\Grid\Column\ColumnCollection;

$dataColumn = new DataColumn('id_product');
     'field' => 'id_product',

$columns = new ColumnCollection();