| 
| 
array  | $attributes = array() | 
|   | Extra select field attributes. 
  | 
|   | 
| 
string  | $class = 'singleselect' | 
|   | Wrapping div class. 
  | 
|   | 
| 
bool  | $disabled = false | 
|   | True if button disabled, false if normal. 
  | 
|   | 
| 
string  | $formid = null | 
|   | Form id. 
  | 
|   | 
| 
help_icon  | $helpicon = null | 
|   | The help icon for this element. 
  | 
|   | 
| 
string  | $label = '' | 
|   | Button label. 
  | 
|   | 
| 
array  | $labelattributes = array() | 
|   | Button label's attributes. 
  | 
|   | 
| 
string  | $method = 'get' | 
|   | Form submit method post or get. 
  | 
|   | 
| 
string  | $name | 
|   | Name of the select element. 
  | 
|   | 
| 
array  | $nothing | 
|   | Nothing selected. 
  | 
|   | 
| array  | $options | 
|   | $options associative array value=>label ex.  More...
  | 
|   | 
| 
string  | $selected | 
|   | Selected option. 
  | 
|   | 
| 
string  | $tooltip = null | 
|   | Button tooltip. 
  | 
|   | 
| 
moodle_url  | $url | 
|   | Target url - includes hidden fields. 
  | 
|   | 
◆ __construct()
      
        
          | single_select::__construct  | 
          ( | 
          moodle_url  | 
          $url,  | 
        
        
           | 
           | 
            | 
          $name,  | 
        
        
           | 
           | 
          array  | 
          $options,  | 
        
        
           | 
           | 
            | 
          $selected = '',  | 
        
        
           | 
           | 
            | 
          $nothing = array('' => 'choosedots'),  | 
        
        
           | 
           | 
            | 
          $formid = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Constructor. 
- Parameters
 - 
  
    | moodle_url | $url | form action target, includes hidden fields  | 
    | string | $name | name of selection field - the changing parameter in url  | 
    | array | $options | list of options  | 
    | string | $selected | selected element  | 
    | array | $nothing |  | 
    | string | $formid |  | 
  
   
 
 
◆ add_action()
Add action to the button. 
- Parameters
 - 
  
  
 
 
 
◆ add_confirm_action()
      
        
          | single_select::add_confirm_action  | 
          ( | 
            | 
          $confirmmessage | ) | 
           | 
        
      
 
Shortcut for adding a JS confirm dialog when the button is clicked. 
The message must be a yes/no question.
- Parameters
 - 
  
    | string | $confirmmessage | The yes/no confirmation question. If "Yes" is clicked, the original action will occur.  | 
  
   
 
 
◆ export_for_template()
Export data. 
- Parameters
 - 
  
  
 
- Return values
 - 
  
  
 
Implements templatable.
 
 
◆ set_help_icon()
      
        
          | single_select::set_help_icon  | 
          ( | 
            | 
          $identifier,  | 
        
        
           | 
           | 
            | 
          $component = 'moodle'  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Adds help icon. 
- Parameters
 - 
  
    | string | $identifier | The keyword that defines a help page  | 
    | string | $component |  | 
  
   
 
 
◆ set_label()
      
        
          | single_select::set_label  | 
          ( | 
            | 
          $label,  | 
        
        
           | 
           | 
            | 
          $attributes = array()  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Sets select's label. 
- Parameters
 - 
  
    | string | $label |  | 
    | array | $attributes | (optional)  | 
  
   
 
 
◆ set_old_help_icon()
      
        
          | single_select::set_old_help_icon  | 
          ( | 
            | 
          $helppage,  | 
        
        
           | 
           | 
            | 
          $title,  | 
        
        
           | 
           | 
            | 
          $component = 'moodle'  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ $options
      
        
          | array single_select::$options | 
        
      
 
$options associative array value=>label ex. 
: array(1=>'One, 2=>Two) it is also possible to specify optgroup as complex label array ex.: array(array('Odd'=>array(1=>'One', 3=>'Three)), array('Even'=>array(2=>'Two'))) array(1=>'One', '–1uniquekey'=>array('More'=>array(2=>'Two', 3=>'Three'))) 
 
 
The documentation for this class was generated from the following file: