| 
| 
array  | $attributes = array() | 
|   | Extra select field attributes. 
  | 
|   | 
| 
string  | $class = 'urlselect' | 
|   | 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. 
  | 
|   | 
| 
array  | $nothing | 
|   | Nothing selected. 
  | 
|   | 
| 
string  | $selected | 
|   | Selected option. 
  | 
|   | 
| 
string  | $showbutton = null | 
|   | If set, makes button visible with given name for button. 
  | 
|   | 
| 
string  | $tooltip = null | 
|   | Button tooltip. 
  | 
|   | 
| array  | $urls | 
|   | $urls associative array value=>label ex.  More...
  | 
|   | 
◆ __construct()
      
        
          | url_select::__construct  | 
          ( | 
          array  | 
          $urls,  | 
        
        
           | 
           | 
            | 
          $selected = '',  | 
        
        
           | 
           | 
            | 
          $nothing = array('' => 'choosedots'),  | 
        
        
           | 
           | 
            | 
          $formid = null,  | 
        
        
           | 
           | 
            | 
          $showbutton = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Constructor. 
- Parameters
 - 
  
    | array | $urls | list of options  | 
    | string | $selected | selected element  | 
    | array | $nothing |  | 
    | string | $formid |  | 
    | string | $showbutton | Set to text of button if it should be visible or null if it should be hidden (hidden version always has text 'go')  | 
  
   
 
 
◆ clean_url()
  
  
      
        
          | url_select::clean_url  | 
          ( | 
            | 
          $value | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Clean a URL. 
- Parameters
 - 
  
  
 
- Return values
 - 
  
  
 
 
 
◆ export_for_template()
Export for template. 
- Parameters
 - 
  
  
 
- Return values
 - 
  
  
 
Implements templatable.
 
 
◆ flatten_options()
  
  
      
        
          | url_select::flatten_options  | 
          ( | 
            | 
          $options,  | 
         
        
           | 
           | 
            | 
          $nothing  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Flatten the options for Mustache. 
This also cleans the URLs.
- Parameters
 - 
  
    | array | $options | The options.  | 
    | array | $nothing | The nothing option.  | 
  
   
- Return values
 - 
  
  
 
 
 
◆ set_help_icon()
      
        
          | url_select::set_help_icon  | 
          ( | 
            | 
          $identifier,  | 
        
        
           | 
           | 
            | 
          $component = 'moodle'  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Adds help icon. 
- Parameters
 - 
  
    | string | $identifier | The keyword that defines a help page  | 
    | string | $component |  | 
  
   
 
 
◆ set_label()
      
        
          | url_select::set_label  | 
          ( | 
            | 
          $label,  | 
        
        
           | 
           | 
            | 
          $attributes = array()  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Sets select's label. 
- Parameters
 - 
  
    | string | $label |  | 
    | array | $attributes | (optional)  | 
  
   
 
 
◆ set_old_help_icon()
      
        
          | url_select::set_old_help_icon  | 
          ( | 
            | 
          $helppage,  | 
        
        
           | 
           | 
            | 
          $title,  | 
        
        
           | 
           | 
            | 
          $component = 'moodle'  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ $urls
$urls 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: