示例#1
0
 /**
  * Get the link for first various statistic
  * @return string
  */
 public static function getLinkForVariousStats()
 {
     $Factory = new PluginFactory();
     $array = $Factory->variousPlugins();
     return $Factory->newInstance($array[0])->getLink();
 }
示例#2
0
		<div id="statistics" class="panel">
			<ul id="statistics-nav">
				<?php 
$Factory = new PluginFactory();
$Stats = $Factory->activePlugins(PluginType::STAT);
foreach ($Stats as $i => $key) {
    $Plugin = $Factory->newInstance($key);
    if ($Plugin !== false) {
        echo '<li' . ($i == 0 ? ' class="active"' : '') . '>' . $Plugin->getLink() . '</li>';
    }
}
if (PluginStat::hasVariousStats()) {
    echo '<li class="with-submenu">';
    echo '<a href="#">' . __('Miscellaneous') . '</a>';
    echo '<ul class="submenu">';
    $VariousStats = $Factory->variousPlugins();
    foreach ($VariousStats as $key) {
        $Plugin = $Factory->newInstance($key);
        if ($Plugin !== false) {
            echo '<li>' . $Plugin->getLink() . '</li>';
        }
    }
    echo '</ul>';
    echo '</li>';
}
?>
			</ul>
			<div id="statistics-inner">
				<?php 
if (isset($_GET['id'])) {
    $Context = new Context(Request::sendId(), SessionAccountHandler::getId());