Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoodleQuickForm_url Class Reference
Inheritance diagram for MoodleQuickForm_url:
templatable

Public Member Functions

 __construct ($elementName=null, $elementLabel=null, $attributes=null, $options=null)
 Constructor. More...
 
 export_for_template (renderer_base $output)
 Function to export the renderer data in a format that is suitable for a mustache template. More...
 
 get_force_ltr ()
 Get force LTR option. More...
 
 getElementTemplateType ()
 Slightly different container template when frozen. More...
 
 getFilePickerHTML ()
 
 getHelpButton ()
 get html for help button More...
 
 MoodleQuickForm_url ($elementName=null, $elementLabel=null, $attributes=null, $options=null)
 Old syntax of class constructor. More...
 
 setHiddenLabel ($hiddenLabel)
 Sets label to be hidden. More...
 
 toHtml ()
 Returns HTML for this form element. More...
 

Public Attributes

string $_helpbutton =''
 html for help button, if empty then no help
 
bool $_hiddenLabel =false
 if true label will be hidden
 

Protected Member Functions

 get_filepicker_unique_id ()
 Returns the unique id of the file picker associated with this url element, setting it in the process if not set. More...
 

Protected Attributes

string $filepickeruniqueid
 the unique id of the filepicker, if enabled.
 

Constructor & Destructor Documentation

◆ __construct()

MoodleQuickForm_url::__construct (   $elementName = null,
  $elementLabel = null,
  $attributes = null,
  $options = null 
)

Constructor.

Parameters
string$elementNameElement name
mixed$elementLabelLabel(s) for an element
mixed$attributesEither a typical HTML attribute string or an associative array.
array$optionsdata which need to be posted.

Member Function Documentation

◆ export_for_template()

MoodleQuickForm_url::export_for_template ( renderer_base  $output)

Function to export the renderer data in a format that is suitable for a mustache template.

This means:

  1. No complex types - only stdClass, array, int, string, float, bool
  2. Any additional info that is required for the template is pre-calculated (e.g. capability checks).
Parameters
renderer_base$outputUsed to do a final render of any components that need to be rendered for export.
Return values
stdClass|array

Implements templatable.

◆ get_filepicker_unique_id()

MoodleQuickForm_url::get_filepicker_unique_id ( )
protected

Returns the unique id of the file picker associated with this url element, setting it in the process if not set.

Return values
stringthe unique id of the file picker.

◆ get_force_ltr()

MoodleQuickForm_url::get_force_ltr ( )

Get force LTR option.

Return values
bool

◆ getElementTemplateType()

MoodleQuickForm_url::getElementTemplateType ( )

Slightly different container template when frozen.

Don't want to use a label tag with a for attribute in that case for the element label but instead use a div. Templates are defined in renderer constructor.

Return values
string

◆ getHelpButton()

MoodleQuickForm_url::getHelpButton ( )

get html for help button

Return values
stringhtml for help button

◆ MoodleQuickForm_url()

MoodleQuickForm_url::MoodleQuickForm_url (   $elementName = null,
  $elementLabel = null,
  $attributes = null,
  $options = null 
)

Old syntax of class constructor.

Deprecated in PHP7.

Deprecated:
since Moodle 3.1

◆ setHiddenLabel()

MoodleQuickForm_url::setHiddenLabel (   $hiddenLabel)

Sets label to be hidden.

Parameters
bool$hiddenLabelsets if label should be hidden

◆ toHtml()

MoodleQuickForm_url::toHtml ( )

Returns HTML for this form element.

Return values
string

The documentation for this class was generated from the following file: