* @copyright 2001-2009 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 Text extends Material { /** * Extends the general constructor by setting material type to 'FOLDER' */ function Text( $id ) { $this->_type = "TEXT"; $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/show-material/" . $this->getID(), "class" =>"document-file" ) ); } /** * Returns translated string describing the type of material * * @return string */ function getTypeName() { return _("Text"); } } ?>