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

20 lines
531 B
PHP

<?php
global $cfg, $type;
use KupShop\AdminBundle\Util\AdminClassLocator;
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;
$type = getVal('type');
$className = ucfirst($type).'List';
$adminClassLocator = ServiceContainer::getService(AdminClassLocator::class);
$classPath = $adminClassLocator->getClassPath('lists/'.$className.'.php');
if (file_exists($classPath)) {
$list = $adminClassLocator->createClass($classPath, $className);
$list->run();
} else {
throw new Exception('Neexistující list '.$type);
}