Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/form/textarea.php
Go to the documentation of this file.
00001 <?php
00002 require_once('HTML/QuickForm/textarea.php');
00003 
00010 class MoodleQuickForm_textarea extends HTML_QuickForm_textarea{
00016     var $_formid = '';
00022     var $_helpbutton='';
00023 
00024     var $_hiddenLabel=false;
00025 
00026     function MoodleQuickForm_textarea($elementName=null, $elementLabel=null, $attributes=null) {
00027         parent::HTML_QuickForm_textarea($elementName, $elementLabel, $attributes);
00028     }
00036     function setHelpButton($helpbuttonargs, $function='helpbutton'){
00037         debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead');
00038     }
00045     function getHelpButton(){
00046         return $this->_helpbutton;
00047     }
00048 
00049     function setHiddenLabel($hiddenLabel){
00050         $this->_hiddenLabel = $hiddenLabel;
00051     }
00052 
00053     function toHtml(){
00054         if ($this->_hiddenLabel){
00055             $this->_generateId();
00056             return '<label class="accesshide" for="' . $this->getAttribute('id') . '" >' .
00057                     $this->getLabel() . '</label>' . parent::toHtml();
00058         } else {
00059             return parent::toHtml();
00060         }
00061     }
00062 
00073     function onQuickFormEvent($event, $arg, &$caller)
00074     {
00075         switch ($event) {
00076             case 'createElement':
00077                 $this->_formid = $caller->getAttribute('id');
00078                 break;
00079         }
00080         return parent::onQuickFormEvent($event, $arg, $caller);
00081     } // end func onQuickFormEvent
00087     function getElementTemplateType(){
00088         if ($this->_flagFrozen){
00089             return 'static';
00090         } else {
00091             return 'default';
00092         }
00093     }
00094 }
 All Data Structures Namespaces Files Functions Variables Enumerations