Пример #1
0
 function getPluginText($plugin, $range_id, $r_data, $m_name)
 {
     $base_url = URLHelper::setBaseURL('');
     $nav = $plugin->getIconNavigation($range_id, $r_data['visitdate'], $GLOBALS['user']->id);
     UrlHelper::setBaseURl($base_url);
     if ($nav instanceof Navigation && $nav->isVisible(true)) {
         if ($nav->getBadgeNumber()) {
             $url = 'seminar_main.php?again=yes&auswahl=' . $range_id . '&redirect_to=' . strtr($nav->getURL(), '?', '&');
             $icon = $nav->getImage();
             $tab = array_pop($plugin->getTabNavigation());
             if ($tab instanceof Navigation && $tab->isVisible()) {
                 $text = $tab->getTitle();
             }
             if (!$text) {
                 $text = $this->registered_modules[$m_name]['name'];
             }
             if ($nav->getBadgeNumber() == 1) {
                 $text .= ' - ' . _("Ein neuer Beitrag:");
             } else {
                 $text .= ' - ' . sprintf(_("%s neue Beiträge:"), $nav->getBadgeNumber());
             }
             return compact('text', 'url', 'icon', 'range_id');
         } else {
             return null;
         }
     }
 }