baseline
[omp.pkp.sfu.ca.git] / classes / plugins / ThemePlugin.inc.php
blob929b5feba0b1e6b9f021627d2fbb638d04c18d11
1 <?php
3 /**
4 * @file classes/plugins/ThemePlugin.inc.php
6 * Copyright (c) 2003-2008 John Willinsky
7 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
9 * @class ThemePlugin
10 * @ingroup plugins
12 * @brief Abstract class for theme plugins
15 // $Id: ThemePlugin.inc.php,v 1.2 2009/06/09 23:37:13 tylerl Exp $
18 class ThemePlugin extends Plugin {
19 /**
20 * Get the name of this plugin. The name must be unique within
21 * its category.
22 * @return String name of plugin
24 function getName() {
25 // This should not be used as this is an abstract class
26 return 'ThemePlugin';
29 /**
30 * Get the display name of this plugin.
31 * @return String
33 function getDisplayName() {
34 // This name should never be displayed because child classes
35 // will override this method.
36 return 'Abstract Theme Plugin';
39 /**
40 * Get a description of the plugin.
42 function getDescription() {
43 return 'This is the ThemePlugin base class. Its functions can be overridden by subclasses to provide theming support.';
46 /**
47 * Activate the theme.
49 function activate(&$templateMgr) {
50 // Subclasses may override this function.
52 if (($stylesheetFilename = $this->getStylesheetFilename()) != null) {
53 $path = Request::getBaseUrl() . '/' . $this->getPluginPath() . '/' . $stylesheetFilename;
54 $templateMgr->addStyleSheet($path);