Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
qbank_viewquestiontext\output\question_text_format Class Reference
Inheritance diagram for qbank_viewquestiontext\output\question_text_format:
renderable templatable

Public Member Functions

 __construct (view $qbank)
 Store the returnurl and the current preference value.
 
 export_for_template (renderer_base $output)
 Function to export the renderer data in a format that is suitable for a mustache template.
 

Public Attributes

int const FULL = 2
 Question text is displayed fully rendered.
 
int const OFF = 0
 Question text is off.
 
int const PLAIN = 1
 Question text is displayed in plain text mode.
 

Protected Attributes

int mixed int $preference
 The current display preference value.
 
moodle_url moodle_url $returnurl
 The return URL for redirecting back to the current question bank page.
 

Constructor & Destructor Documentation

◆ __construct()

qbank_viewquestiontext\output\question_text_format::__construct ( view $qbank)

Store the returnurl and the current preference value.

Parameters
view$qbank
Exceptions
moodle_exception

Member Function Documentation

◆ export_for_template()

qbank_viewquestiontext\output\question_text_format::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.


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