Beispiel #1
0
 public static function formatLi(rex_structure_element $OOobject, $current_category_id, rex_context $context, $liAttr = '', $linkAttr = '')
 {
     $linkAttr .= ' class="' . ($OOobject->isOnline() ? 'rex-online' : 'rex-offline') . '"';
     if (strpos($linkAttr, ' href=') === false) {
         $linkAttr .= ' href="' . $context->getUrl(['category_id' => $OOobject->getId()]) . '"';
     }
     $label = self::formatLabel($OOobject);
     $icon = '<i class="rex-icon rex-icon-' . ($OOobject->isStartArticle() ? 'startarticle' : 'article') . '"></i>';
     return '<li' . $liAttr . '><a' . $linkAttr . '>' . $icon . ' ' . htmlspecialchars($label) . '</a>';
 }
Beispiel #2
0
 public static function formatLi(rex_structure_element $OOobject, $current_category_id, rex_context $context, $liAttr = '', $linkAttr = '')
 {
     $liAttr .= $OOobject->getId() == $current_category_id ? ' id="rex-linkmap-active"' : '';
     $linkAttr .= ' class="' . ($OOobject->isOnline() ? 'rex-online' : 'rex-offline') . '"';
     if (strpos($linkAttr, ' href=') === false) {
         $linkAttr .= ' href="' . $context->getUrl(['category_id' => $OOobject->getId()]) . '"';
     }
     $label = self::formatLabel($OOobject);
     return '<li' . $liAttr . '><a' . $linkAttr . '>' . htmlspecialchars($label) . '</a>';
 }