Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/form/selectyesno.php
Go to the documentation of this file.
00001 <?php
00002 global $CFG;
00003 require_once "$CFG->libdir/form/select.php";
00004 
00011 class MoodleQuickForm_selectyesno extends MoodleQuickForm_select{
00012 
00013 
00024     function MoodleQuickForm_selectyesno($elementName=null, $elementLabel=null, $attributes=null, $options=null)
00025     {
00026         HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes, null);
00027         $this->_type = 'selectyesno';
00028 
00029     } //end constructor
00030 
00041     function onQuickFormEvent($event, $arg, &$caller)
00042     {
00043         switch ($event) {
00044             case 'createElement':
00045                 $choices=array();
00046                 $choices[0] = get_string('no');
00047                 $choices[1] = get_string('yes');
00048                 $this->load($choices);
00049                 break;
00050         }
00051         return parent::onQuickFormEvent($event, $arg, $caller);
00052     }
00053 
00054 }
 All Data Structures Namespaces Files Functions Variables Enumerations