This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Incam_SGD/plugins/WemagDashboardManagement/WemagDashboardManagementPlugin.php

67 lines
2.8 KiB
PHP

<?php
/**
* This file is part of Wemag Dashboard Management.
*
* Wemag Dashboard Management is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Wemag Dashboard Management is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Wemag Dashboard Management. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2008 Aart-Jan Boor <aart-jan@wemag.nl>
* Wemag Advisering <http://www.wemag.nl>
*/
/**
* Sets up the Wemag Dashboard Management plugin for KnowledgeTree
*
*/
class WemagDashboardManagement extends KTPlugin {
var $sNamespace = "Wemag.DashboardManagement.plugin";
function WemagDashboardManagement($sFilename = null) {
$res = parent::KTPlugin($sFilename);
$this->sFriendlyName = _kt('WemagDashboardManagement - Manage user dashboards');
return $res;
}
function setup(){
//admin area
$this->registerAdminCategory("dashboardmanagement", _kt("Dashboard Management"),
_kt("Set up a default dashboard and manage dashboard settings."));
$this->registerAdminPage("configure",'ConfigureDashboardDispatcher','dashboardmanagement', _kt('Dashboard settings'),
_kt('Configure dashboard behaviour.'), 'admin/configure.php');
$this->registerAdminPage("defaultdashboard",'SetDefaultDashboardDispatcher','dashboardmanagement', _kt('Default dashboard'),
_kt('Set up a default dashboard for new users.'), 'admin/defaultdashboard.php');
$this->registerAdminPage("resetdashboards",'ResetDashboardsDispatcher','dashboardmanagement', _kt('Reset dashboards'),
_kt('Resets the dashboard of all users to the default one.'), 'admin/resetdashboards.php');
//template location
$oTemplating =& KTTemplating::getSingleton();
$oTemplating->addLocation('WemagDashboardManagement', '/plugins/WemagDashboardManagement/admin/templates');
//dashlet
$this->registerDashlet('ResetDashboardDashlet', 'wemag.dashlets.resetdashboarddashlet', 'dashlet/ResetDashboardDashlet.php');
//set up settings
KTUtil::setSystemSetting("wemag-dashboard-management-default-dashboard","");
KTUtil::setSystemSetting("wemag-dashboard-management-plugin-auto-add-new-dashlets","true");
}
}
$oRegistry =& KTPluginRegistry::getSingleton();
$oRegistry->registerPlugin('WemagDashboardManagement', 'Wemag.DashboardManagement.plugin', __FILE__);
?>