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.
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
{
20 * Get the name of this plugin. The name must be unique within
22 * @return String name of plugin
25 // This should not be used as this is an abstract class
30 * Get the display name of this plugin.
33 function getDisplayName() {
34 // This name should never be displayed because child classes
35 // will override this method.
36 return 'Abstract Theme Plugin';
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.';
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);