Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
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. More...
 

Static Public Member Functions

static get_base_url ()
 Returns base URL for the manager. More...
 

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