Navigation: Fix that a module's item class is not found

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-07 12:01:05 +02:00
parent 7d167d0191
commit 411c6e0546
1 changed files with 6 additions and 1 deletions

View File

@ -141,7 +141,12 @@ class Navigation implements ArrayAccess, Countable, IteratorAggregate
$item = null; $item = null;
foreach (Icinga::app()->getModuleManager()->getLoadedModules() as $module) { foreach (Icinga::app()->getModuleManager()->getLoadedModules() as $module) {
$classPath = 'Icinga\\Module\\' . $module->getName() . '\\' . static::NAVIGATION_NS . '\\' . $itemType; $classPath = 'Icinga\\Module\\'
. ucfirst($module->getName())
. '\\'
. static::NAVIGATION_NS
. '\\'
. $itemType;
if (class_exists($classPath)) { if (class_exists($classPath)) {
$item = new $classPath($name, $properties); $item = new $classPath($name, $properties);
break; break;