Rev 224 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 224 | Rev 227 | ||
---|---|---|---|
Line 240... | Line 240... | ||
240 | $out['text'] .= '</div></div>'; |
240 | $out['text'] .= '</div></div>'; |
241 | } |
241 | } |
242 | } |
242 | } |
243 | 243 | ||
244 | if ($show_obj_active || $show_obj_inactive) { |
244 | if ($show_obj_active || $show_obj_inactive) { |
245 | $enabled = $show_obj_active ? OIDplus::getRegisteredObjectTypes() : array(); |
245 | $enabled = $show_obj_active ? OIDplus::getObjectTypePluginsEnabled() : array(); |
246 | $disabled = $show_obj_inactive ? OIDplus::getDisabledObjectTypes() : array(); |
246 | $disabled = $show_obj_inactive ? OIDplus::getObjectTypePluginsDisabled() : array(); |
247 | if (count($plugins = array_merge($enabled, $disabled)) > 0) { |
247 | if (count($plugins = array_merge($enabled, $disabled)) > 0) { |
248 | $out['text'] .= '<h2>Object types</h2>'; |
248 | $out['text'] .= '<h2>Object types</h2>'; |
249 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
249 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
250 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
250 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
251 | $out['text'] .= ' <tr>'; |
251 | $out['text'] .= ' <tr>'; |
252 | $out['text'] .= ' <th width="25%">Class name</th>'; |
252 | $out['text'] .= ' <th width="25%">Class name</th>'; |
253 | $out['text'] .= ' <th width="25%">Plugin name</th>'; |
253 | $out['text'] .= ' <th width="25%">Plugin name</th>'; |
254 | $out['text'] .= ' <th width="25%">Plugin version</th>'; |
254 | $out['text'] .= ' <th width="25%">Plugin version</th>'; |
255 | $out['text'] .= ' <th width="25%">Plugin author</th>'; |
255 | $out['text'] .= ' <th width="25%">Plugin author</th>'; |
256 | $out['text'] .= ' </tr>'; |
256 | $out['text'] .= ' </tr>'; |
257 | foreach ($plugins as $pluginName) { |
257 | foreach ($plugins as $plugin) { |
258 | $out['text'] .= ' <tr>'; |
258 | $out['text'] .= ' <tr>'; |
259 | $pluginInfo = $pluginName::getPluginInformation(); |
259 | $pluginInfo = $plugin::getPluginInformation(); |
260 | if (in_array($pluginName, $enabled)) { |
260 | if (in_array($plugin, $enabled)) { |
261 | $out['text'] .= '<td><a '.oidplus_link('oidplus:system_plugins.$'.$pluginName).'>'.htmlentities($pluginName).'</a></td>'; |
261 | $out['text'] .= '<td><a '.oidplus_link('oidplus:system_plugins.$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
262 | } else { |
262 | } else { |
263 | $out['text'] .= '<td><a '.oidplus_link('oidplus:system_plugins.$'.$pluginName).'><font color="gray">'.htmlentities($pluginName).' (disabled)</font></a></td>'; |
263 | $out['text'] .= '<td><a '.oidplus_link('oidplus:system_plugins.$'.get_class($plugin)).'><font color="gray">'.htmlentities(get_class($plugin)).' (disabled)</font></a></td>'; |
264 | } |
264 | } |
265 | if (!isset($pluginInfo['name']) || empty($pluginInfo['name'])) $pluginInfo['name'] = 'n/a'; |
265 | if (!isset($pluginInfo['name']) || empty($pluginInfo['name'])) $pluginInfo['name'] = 'n/a'; |
266 | if (!isset($pluginInfo['author']) || empty($pluginInfo['author'])) $pluginInfo['author'] = 'n/a'; |
266 | if (!isset($pluginInfo['author']) || empty($pluginInfo['author'])) $pluginInfo['author'] = 'n/a'; |
267 | if (!isset($pluginInfo['version']) || empty($pluginInfo['version'])) $pluginInfo['version'] = 'n/a'; |
267 | if (!isset($pluginInfo['version']) || empty($pluginInfo['version'])) $pluginInfo['version'] = 'n/a'; |
268 | $out['text'] .= '<td>' . htmlentities($pluginInfo['name']) . '</td>'; |
268 | $out['text'] .= '<td>' . htmlentities($pluginInfo['name']) . '</td>'; |
Line 409... | Line 409... | ||
409 | 'text' => '<font color="gray">'.$txt.'</font>', |
409 | 'text' => '<font color="gray">'.$txt.'</font>', |
410 | ); |
410 | ); |
411 | } |
411 | } |
412 | } |
412 | } |
413 | $obj_plugins = array(); |
413 | $obj_plugins = array(); |
414 | $enabled = OIDplus::getRegisteredObjectTypes(); |
414 | $enabled = OIDplus::getObjectTypePluginsEnabled(); |
415 | $disabled = OIDplus::getDisabledObjectTypes(); |
415 | $disabled = OIDplus::getObjectTypePluginsDisabled(); |
416 | foreach (array_merge($enabled, $disabled) as $plugin) { |
416 | foreach (array_merge($enabled, $disabled) as $plugin) { |
417 | $pluginInfo = $plugin::getPluginInformation(); |
417 | $pluginInfo = $plugin::getPluginInformation(); |
418 | $txt = (!isset($pluginInfo['name']) || empty($pluginInfo['name'])) ? $plugin : $pluginInfo['name']; |
418 | $txt = (!isset($pluginInfo['name']) || empty($pluginInfo['name'])) ? $plugin : $pluginInfo['name']; |
419 | 419 | ||
420 | // $txt = htmlentities($plugin::objectTypeTitle()).' ('.htmlentities($plugin::ns()).')'; |
- | |
421 | - | ||
422 | if (in_array($plugin, $enabled)) { |
420 | if (in_array($plugin, $enabled)) { |
423 | $obj_plugins[] = array( |
421 | $obj_plugins[] = array( |
424 | 'id' => 'oidplus:system_plugins.$'.$plugin, |
422 | 'id' => 'oidplus:system_plugins.$'.get_class($plugin), |
425 | 'icon' => $tree_icon_obj_active, |
423 | 'icon' => $tree_icon_obj_active, |
426 | 'text' => $txt, |
424 | 'text' => $txt, |
427 | ); |
425 | ); |
428 | } else { |
426 | } else { |
429 | $obj_plugins[] = array( |
427 | $obj_plugins[] = array( |
430 | 'id' => 'oidplus:system_plugins.$'.$plugin, |
428 | 'id' => 'oidplus:system_plugins.$'.get_class($plugin), |
431 | 'icon' => $tree_icon_obj_inactive, |
429 | 'icon' => $tree_icon_obj_inactive, |
432 | 'text' => '<font color="gray">'.$txt.'</font>', |
430 | 'text' => '<font color="gray">'.$txt.'</font>', |
433 | ); |
431 | ); |
434 | } |
432 | } |
435 | } |
433 | } |