app->getModuleManager()->listEnabledModules(); if (!in_array($name, $enabledModules)) { throw new Exception("Module with name '$name' not found or is not enabled"); } return $name; } }