Files
kupshop/admin/lists/AdminsList.php
2025-08-02 16:30:27 +02:00

24 lines
690 B
PHP

<?php
use KupShop\AdminBundle\AdminList\BaseList;
class AdminsList extends BaseList
{
protected $tableDef = [
'id' => 'id',
'fields' => [
'Login' => ['field' => 'login'],
'Aktivní' => ['field' => 'active', 'render' => 'renderBoolean'],
'Všechna práva' => ['field' => 'superuser', 'render' => 'renderBoolean'],
'Expirace' => ['field' => 'date_valid', 'render' => 'renderDateTime'],
],
];
public function getQuery()
{
$qb = sqlQueryBuilder()->select('id', 'login', 'active', 'IF(privilege = "ALL_RIGHTS", "Y", "N") as superuser', 'date_valid')->from('admins');
return $qb;
}
}