You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

38 lines
806 B

  1. <?php
  2. namespace dokuwiki\Menu\Item;
  3. /**
  4. * Class Top
  5. *
  6. * Scroll back to the top. Uses a hash as $id which is handled special in getLink().
  7. * Not shown in mobile context
  8. */
  9. class Top extends AbstractItem
  10. {
  11. /** @inheritdoc */
  12. public function __construct()
  13. {
  14. parent::__construct();
  15. $this->svg = DOKU_INC . 'lib/images/menu/10-top_arrow-up.svg';
  16. $this->accesskey = 't';
  17. $this->params = ['do' => ''];
  18. $this->id = '#dokuwiki__top';
  19. $this->context = self::CTX_DESKTOP;
  20. }
  21. /**
  22. * Convenience method to create a <button> element
  23. *
  24. * Uses html_topbtn()
  25. *
  26. * @return string
  27. * @todo this does currently not support the SVG icon
  28. */
  29. public function asHtmlButton()
  30. {
  31. return html_topbtn();
  32. }
  33. }