<?php

$className = $menu->name ?? '';
$plugin    = $oPlugin ?? null;
if ($plugin === null) {
    die('Plugin has not been loaded.');
}
if ($className === '') {
    die('Cant find a controller with the name ' . $className . '.');
}
// @todo This should fail in older versions of JTL Shop. Or maybe the getPluginID() resolves to the correct path?
$className  = 'Plugin\\' . $plugin->getPluginID() . '\adminmenu\Controller\\' . $className;
$controller = new $className($plugin);
