Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.

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

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