Location: PHPKode > projects > Community Learning Network > cln/lib/CLN/Cln_Module.php
<?php
/*
 * Generic Module Class
 *
 * Copyright (c) 2003-4 St. Christopher House
 *
 * Developed by The Working Group Inc.
 *
 * This program 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 2
 * of the License, or (at your option) any later version.
 *
 * This program 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 this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * @version $Id: Cln_Module.php,v 1.14 2004/12/02 18:56:37 darcy Exp $
 *
 */

class Cln_Module
{

	/*
	 *
	 * Class Attributes:  Cln_Module
	 *
	 * 		The attributes for this class are:
	 *
	 *		TBD
	 *
	 */


	/*
	 *
	 * Function:  getEditContent()
	 *
	 * 		Returns the edit form for this module
	 *
	 * @access public
	 * @return TBD
	 *
	 */
	function getEditContent($override = FALSE)
	{
		return FALSE;
	}

	/*
	 *
	 * Function:  getEditPanelGeneral()
	 *
	 * 		Returns the general edit panel components
	 *
	 * @access public
	 * @return String 		$message
	 *
	 */
	function getEditPanelGeneral()
	{
		return Array();
	}


	/*
	 *
	 * Function:  getEditPanelLanguages()
	 *
	 * 		Returns the language specific edit panel components
	 *
	 * @access public
	 * @return String 		$message
	 *
	 */
	function getEditPanelLanguages()
	{
		return Array();
	}


	/*
	 *
	 * Function:  registerStylesheet()
	 *
	 * 		Registers stylesheet, so that html-based module (ie. Room) can load stylesheets
	 *
	 * @access public
	 * @return Bool 	TRUE or FALSE
	 *
	 */
	function registerStylesheet($href,$rel="stylesheet",$media="screen",$type="text/css")
	{
		$GLOBALS['Stylesheets'][] = array(
			'href' => $href,
			'rel' => $rel,
			'media' => $media,
			'type' => $type
		);
		
		return TRUE;
	}


	/*
	 *
	 * Function: publish()
	 *
	 * Should take an array of all the data from an object that is needed by another
	 * object and publish it.
	 *
	 * @access public
	 * @return TBD
	 *
	 */
	function publish($publishData = FALSE)
	{
		d('publish() has not been defined for the class:'.get_class($this));
		return FALSE;
	}


	/*
	 *
	 * Function: delete()
	 *
	 * 		delete stub
	 *
	 * @access public
	 * @return TBD
	 *
	 */
	function delete($publishData = FALSE)
	{
		d('delete() has not been defined for the class:'.get_class($this));
		return FALSE;
	}


	/*
	 *
	 * Function: getPublishData()
	 *
	 * Should return an array of all the data from an object that is needed by another
	 * object to publish it.
	 *
	 * @access public
	 * @return TBD
	 *
	 */
	function getPublishData()
	{
		return FALSE;
	}


	/*
	 *
	 * Function: getNewTranslationData()
	 *
	 * To get general stuff that is needed when creating a translation version
	 *
	 * @access public
	 * @return TBD
	 *
	 */
	function getNewTranslationData()
	{
		return FALSE;
	}


	/*
	 *
	 * Function: updateModified()
	 *
	 * Should return the mysql timestamp of the object's mod date.
	 *
	 * @access public
	 * @return TBD
	 *
	 */
	function updateModified()
	{
		if (isset($this->_super)) {
			$this->_super->updateModified();
			return TRUE;
		}
		else {
			PEAR::raiseError('updateModified() called within a part, but _super wasn\'t set', E_ERROR);
			return FALSE;
		}
	}


	/*
	 *
	 * Function: getMyHouseNavItem()
	 *
	 * Returns an array of data that is used to make a link in MyHouse
	 *
	 * @access public
	 * @return TBD
	 *
	 */
	function getMyHouseNavItem()
	{
		return FALSE;
	}


	/*
	 *
	 * Function: logout()
	 *
	 * performs any cleanup on module, when user logs out
	 *
	 * @access public
	 * @return TBD
	 *
	 */
	function logout()
	{
		return TRUE;
	}

}

?>
Return current item: Community Learning Network