Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
quizaccess_seb\template_controller Class Reference

Class for manipulating with the template records. More...

Public Member Functions

 __construct ()
 region_manager constructor.
 
 execute ($action)
 Execute required action.
 

Static Public Member Functions

static get_base_url ()
 Returns base URL for the manager.
 

Public Attributes

const ACTION_ADD = 'add'
 Add action.
 
const ACTION_DELETE = 'delete'
 Delete action.
 
const ACTION_EDIT = 'edit'
 Edit action.
 
const ACTION_HIDE = 'hide'
 Hide action.
 
const ACTION_SHOW = 'show'
 Show action.
 
const ACTION_VIEW = 'view'
 View action.
 

Protected Member Functions

 delete ($id)
 Execute delete action.
 
 display_all_records ()
 Print out all records in a table.
 
 edit ($action, $id=null)
 Execute edit action.
 
 footer ()
 Print out the page footer.
 
 get_create_button_text ()
 Returns a text for create new record button.
 
 get_edit_heading ()
 Edit record heading string.
 
 get_form ($instance)
 Returns form for the record.
 
 get_instance ($id=0, stdClass $data=null)
 Return record instance.
 
 get_new_heading ()
 New record heading string.
 
 get_view_heading ()
 View page heading string.
 
 header ($title)
 Print out page header.
 
 hide ($id)
 Hide the template.
 
 print_add_button ()
 Print out add button.
 
 set_external_page ()
 Set external page for the manager.
 
 show (int $id)
 Show the template.
 
 show_hide (int $id, int $visibility)
 Show or Hide the template.
 
 view ()
 Execute view action.
 

Protected Attributes

bootstrap_renderer $output
 Locally cached $OUTPUT object.
 

Detailed Description

Class for manipulating with the template records.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ delete()

quizaccess_seb\template_controller::delete ( $id)
protected

Execute delete action.

Parameters
int$idID of the region.

◆ edit()

quizaccess_seb\template_controller::edit ( $action,
$id = null )
protected

Execute edit action.

Parameters
string$actionCould be edit or create.
null | int$idId of the region or null if creating a new one.

◆ execute()

quizaccess_seb\template_controller::execute ( $action)

Execute required action.

Parameters
string$actionAction to execute.

◆ footer()

quizaccess_seb\template_controller::footer ( )
protected

Print out the page footer.

Return values
void

◆ get_base_url()

static quizaccess_seb\template_controller::get_base_url ( )
static

Returns base URL for the manager.

Return values
string

◆ get_create_button_text()

quizaccess_seb\template_controller::get_create_button_text ( )
protected

Returns a text for create new record button.

Return values
string

◆ get_edit_heading()

quizaccess_seb\template_controller::get_edit_heading ( )
protected

Edit record heading string.

Return values
string

◆ get_form()

quizaccess_seb\template_controller::get_form ( $instance)
protected

Returns form for the record.

Parameters
quizaccess_seb\template | null$instance
Return values
quizaccess_seb\local\form\template

◆ get_instance()

quizaccess_seb\template_controller::get_instance ( $id = 0,
stdClass $data = null )
protected

Return record instance.

Parameters
int$id
stdClass | null$data
Return values
quizaccess_seb\template

◆ get_new_heading()

quizaccess_seb\template_controller::get_new_heading ( )
protected

New record heading string.

Return values
string

◆ get_view_heading()

quizaccess_seb\template_controller::get_view_heading ( )
protected

View page heading string.

Return values
string

◆ header()

quizaccess_seb\template_controller::header ( $title)
protected

Print out page header.

Parameters
string$titleTitle to display.

◆ hide()

quizaccess_seb\template_controller::hide ( $id)
protected

Hide the template.

Parameters
int$idThe ID of the template to hide.

◆ show()

quizaccess_seb\template_controller::show ( int $id)
protected

Show the template.

Parameters
int$idThe ID of the template to show.

◆ show_hide()

quizaccess_seb\template_controller::show_hide ( int $id,
int $visibility )
protected

Show or Hide the template.

Parameters
int$idThe ID of the template to hide.
int$visibilityThe intended visibility.

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