An additional option that can be applied to an admin setting.  
 More...
|  | 
| Checkbox const | DISABLED = false | 
|  | for this flag is not displayed in admin page 
 | 
|  | 
| Checkbox const | ENABLED = true | 
|  | for this flag is displayed in admin page 
 | 
|  | 
An additional option that can be applied to an admin setting. 
The currently supported options are 'ADVANCED', 'LOCKED' and 'REQUIRED'.
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ __construct()
      
        
          | admin_setting_flag::__construct | ( |  | $enabled, | 
        
          |  |  |  | $default, | 
        
          |  |  |  | $shortname, | 
        
          |  |  |  | $displayname ) | 
      
 
Constructor. 
- Parameters
- 
  
    | bool | $enabled | Can this option can be toggled. Should be one of admin_setting_flag\ENABLED or admin_setting_flag\DISABLED. |  | bool | $default | The default checked state for this setting option. |  | string | $shortname | The shortname of this flag. Currently supported flags are 'locked' and 'adv' |  | string | $displayname | The displayname of this flag. Used as a label for the flag. |  
 
 
 
◆ get_default()
      
        
          | admin_setting_flag::get_default | ( |  | ) |  | 
      
 
Should this option be checked by default? 
- Return values
- 
  
  
 
 
◆ get_displayname()
      
        
          | admin_setting_flag::get_displayname | ( |  | ) |  | 
      
 
Return the display name for this flag. 
e.g. 'Advanced' or 'Locked'
- Return values
- 
  
  
 
 
◆ get_shortname()
      
        
          | admin_setting_flag::get_shortname | ( |  | ) |  | 
      
 
Return the short name for this flag. 
e.g. 'adv' or 'locked'
- Return values
- 
  
  
 
 
◆ is_enabled()
      
        
          | admin_setting_flag::is_enabled | ( |  | ) |  | 
      
 
Should this option appear in the interface and be toggleable? 
- Return values
- 
  
  
 
 
◆ output_setting_flag()
      
        
          | admin_setting_flag::output_setting_flag | ( | admin_setting | $setting | ) |  | 
      
 
Output the checkbox for this setting flag. 
Should only be called if the flag is enabled.
- Parameters
- 
  
  
- Return values
- 
  
    | string | - The html for the checkbox. |  
 
 
 
◆ set_options()
      
        
          | admin_setting_flag::set_options | ( |  | $enabled, | 
        
          |  |  |  | $default ) | 
      
 
Update the values of this setting options class. 
- Parameters
- 
  
  
 
 
◆ write_setting_flag()
      
        
          | admin_setting_flag::write_setting_flag | ( | admin_setting | $setting, | 
        
          |  |  |  | $data ) | 
      
 
Save the submitted data for this flag - or set it to the default if $data is null. 
- Parameters
- 
  
    | admin_setting | $setting | - The admin setting for this flag |  | array | $data | - The data submitted from the form or null to set the default value for new installs. |  
 
- Return values
- 
  
  
 
 
The documentation for this class was generated from the following file: