Notice: You are browsing the documentation for PrestaShop 8, which is currently in development.You might want to read the documentation for the current version, PrestaShop 1.7.
This is a special type that allows you to add a column with the employee name and its avatar to your Grid. You can see how it looks by default:
|field||string||required Employee’s name field.|
The employee’s name field.
<?php use PrestaShop\PrestaShop\Core\Grid\Column\Type\Employee\EmployeeNameWithAvatarColumn; use PrestaShop\PrestaShop\Core\Grid\Column\ColumnCollection; $employeeColumn = new EmployeeNameWithAvatarColumn('employee'); $employeeColumn->setName('Employee'); $employeeColumn->setOptions([ 'field' => 'employee', ]); $columns = new ColumnCollection(); $columns->add($employeeColumn);