1<?php 2 3namespace dokuwiki\plugin\approve\meta; 4 5use dokuwiki\Menu\Item\AbstractItem; 6 7class ViewModeSiteTools extends AbstractItem { 8 9 /** @inheritdoc */ 10 public function __construct() { 11 parent::__construct(); 12 13 /** @var helper_plugin_approve $helper */ 14 $helper = plugin_load('helper', 'approve'); 15 $viewmode = get_doku_pref('approve_viewmode', false); 16 if ($viewmode) { 17 $this->svg = DOKU_INC . 'lib/plugins/approve/toggle-on-solid.svg'; 18 $this->label = $helper->getLang('btn_view_mode'); 19 } else { 20 $this->svg = DOKU_INC . 'lib/plugins/approve/toggle-off-solid.svg'; 21 $this->label = $helper->getLang('btn_edit_mode'); 22 } 23 } 24} 25