* @copyright 2001-2007 VIKO team and contributors * @license http://www.gnu.org/licenses/gpl.html GPL 2.0 */ /** * This is a child class of Material */ require_once 'Material.php'; /** * Folder class * */ class Folder extends Material { /** * Extends the general constructor by setting material type to 'FOLDER' */ function Folder( $id ) { $this->_type = "FOLDER"; $this->_mime_type = ""; $this->_uri = ""; $this->_size = 0; parent::Material( $id ); } /** * Returns HTML link, that points to the folder * * @return string HTML a element */ function getLink() { $course = $this->getCourse(); return HTML::element( "a", $this->getHTMLName(), array( "href" => "/" . $course->getID() . "/materials/view/" . $this->getID(), "class" => "folder" ) ); } /** * Returns translated string describing the type of material * * @return string */ function getTypeName() { return _("Folder"); } } ?>