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.
 
 
 
 
 

36 lines
750 B

  1. <?php
  2. namespace dokuwiki\Menu\Item;
  3. /**
  4. * Class Feed
  5. */
  6. class Feed extends AbstractItem
  7. {
  8. /** @inheritdoc */
  9. public function __construct()
  10. {
  11. parent::__construct();
  12. global $lang;
  13. if (!in_array('feed', explode(',', tpl_getConf('pageIcons')))) {
  14. throw new \RuntimeException("feed is not available");
  15. }
  16. unset($this->params['do']);
  17. $this->label = $lang['btn_recent'];
  18. $this->svg = tpl_incdir() . 'images/menu/rss.svg';
  19. }
  20. public function getLinkAttributes($classprefix = 'menuitem ')
  21. {
  22. $attr = parent::getLinkAttributes($classprefix);
  23. $attr['href'] = DOKU_URL . 'feed.php?ns=' . getNS($this->id);
  24. return $attr;
  25. }
  26. }