Warning: You are browsing the documentation for PrestaShop 1.7, which is outdated.

You might want to read an updated version of this page for the current version, PrestaShop 8. Read the updated version of this page

Learn how to upgrade to the latest version.

EmployeeNameWithAvatarColumn Type

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:

Employee name with avatar column

Available options

Properties Type Expected value
field string required Employee’s name field.

field

type: string required

The employee’s name field.

Example usage

<?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);