1<?php
2
3namespace dokuwiki\Menu\Item;
4
5// must be run from within DokuWiki
6if (!defined('DOKU_INC')) die();
7
8/**
9 * Class Bottom
10 *
11 * Scroll to the bottom. Uses a hash as $id which is handled special in getLink().
12 */
13class Bottom extends AbstractItem {
14
15    /** @inheritdoc */
16    public function __construct() {
17        parent::__construct();
18
19        $this->svg = DOKU_INC . 'lib/images/menu/10-top_arrow-up.svg';
20        $this->accesskey = 't';
21        $this->params = array('do' => '');
22        $this->id = '#dokuwiki__bottom';
23        $this->context = self::CTX_DESKTOP;
24    }
25    /**
26     * Convenience method to create a <button> element
27     *
28     * Uses html_topbtn()
29     *
30     * @todo this does currently not support the SVG icon
31     * @return string
32     */
33    public function asHtmlButton() {
34        return Kiwiki_Functions::html_bottombtn();
35    }
36
37}
38