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.

SeverityLevelColumn Type

Use this column to display severity level in your Grid.

Available options

Properties Type Expected value
field string required Record field name which is used as severity level.
with_message bool default: false Whether to show severity level message in addition with numeric severity level value.

Example usage

use PrestaShop\PrestaShop\Core\Grid\Column\Type\Status\SeverityLevelColumn;
use PrestaShop\PrestaShop\Core\Grid\Column\ColumnCollection;

$severityColumn = new SeverityLevelColumn('severity');
$severityColumn->setName('Severity (1-4)');
     'field' => 'severity',
     'with_message' => true,    // enable severity messages

$columns = new ColumnCollection();