first commit
This commit is contained in:
19
admin/list.php
Normal file
19
admin/list.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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);
|
||||
}
|
||||
Reference in New Issue
Block a user