Warning: Cannot modify header information - headers already sent by (output started at /var/www/jonas-eriksen.dk/pic/private/index.php:1) in /var/www/jonas-eriksen.dk/pic/private/index.php on line 215
MobileMenu.php000064400000005634152336131030007316 0ustar00 $pagemenu->getItems(), 'site' => $sitemenu->getItems(), 'user' => $usermenu->getItems() ); } /** * Get all items in a flat array * * This returns the same format as AbstractMenu::getItems() * * @return AbstractItem[] */ public function getItems() { $menu = $this->getGroupedItems(); return call_user_func_array('array_merge', array_values($menu)); } /** * Print a dropdown menu with all DokuWiki actions * * Note: this will not use any pretty URLs * * @param string $empty empty option label * @param string $button submit button label * @return string */ public function getDropdown($empty = '', $button = '>') { global $ID; global $REV; /** @var string[] $lang */ global $lang; global $INPUT; $html = '
'; $html .= '
'; $html .= ''; if($REV) $html .= ''; if($INPUT->server->str('REMOTE_USER')) { $html .= ''; } $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; return $html; } } DetailMenu.php000064400000000524152336131030007302 0ustar00context = $context; } /** * Get the list of action items in this menu * * @return AbstractItem[] * @triggers MENU_ITEMS_ASSEMBLY */ public function getItems() { $data = array( 'view' => $this->view, 'items' => array(), ); Event::createAndTrigger('MENU_ITEMS_ASSEMBLY', $data, array($this, 'loadItems')); return $data['items']; } /** * Default action for the MENU_ITEMS_ASSEMBLY event * * @see getItems() * @param array $data The plugin data */ public function loadItems(&$data) { foreach($this->types as $class) { try { $class = "\\dokuwiki\\Menu\\Item\\$class"; /** @var AbstractItem $item */ $item = new $class(); if(!$item->visibleInContext($this->context)) continue; $data['items'][] = $item; } catch(\RuntimeException $ignored) { // item not available } } } /** * Generate HTML list items for this menu * * This is a convenience method for template authors. If you need more fine control over the * output, use getItems() and build the HTML yourself * * @param string|false $classprefix create a class from type with this prefix, false for no class * @param bool $svg add the SVG link * @return string */ public function getListItems($classprefix = '', $svg = true) { $html = ''; foreach($this->getItems() as $item) { if($classprefix !== false) { $class = ' class="' . $classprefix . $item->getType() . '"'; } else { $class = ''; } $html .= ""; $html .= $item->asHtmlLink(false, $svg); $html .= ''; } return $html; } } Item/Revisions.php000064400000000612152336131030010130 0ustar00accesskey = 'o'; $this->type = 'revs'; $this->svg = DOKU_INC . 'lib/images/menu/07-revisions_history.svg'; } } Item/Top.php000064400000001445152336131030006716 0ustar00svg = DOKU_INC . 'lib/images/menu/10-top_arrow-up.svg'; $this->accesskey = 't'; $this->params = array('do' => ''); $this->id = '#dokuwiki__top'; $this->context = self::CTX_DESKTOP; } /** * Convenience method to create a