Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
tool_brickfield\local\areas\mod_book\base Class Reference
Inheritance diagram for tool_brickfield\local\areas\mod_book\base:
tool_brickfield\local\areas\module_area_base tool_brickfield\area_base tool_brickfield\local\areas\mod_book\intro tool_brickfield\local\areas\mod_book\name

Public Member Functions

 find_course_areas (int $courseid)
 Find recordset of the course areas.
 
 find_relevant_areas (\core\event\base $event)
 Find recordset of the relevant areas.
 
 find_system_areas ()
 Return an array of area objects that contain content at the site and system levels only.
 
 get_component ()
 Return the component from the full class name.
 
 get_courseid_filtering ()
 Processes any sql filtering data.
 
 get_fieldname ()
 Return the name of the field in the table that has the content.
 
 get_ref_tablename ()
 Return the name of the reference data table name.
 
 get_reftable_field_sql ()
 The standard Moodle parameter DML parameter substitution doesn't work on all versions of MySQL or Postgres, so we need to use inline function substitution to ensure that the left side is a string.
 
 get_standard_area_fields_sql ()
 The standard Moodle parameter DML parameter substitution doesn't work on all versions of MySQL or Postgres, so we need to use inline function substitution to ensure that the left side is a string.
 
 get_tablename ()
 Return the name of the database table where information is stored.
 
 is_available ()
 Check if the system plugin is avaliable.
 

Static Public Member Functions

static checkgroup_name (int $checkgroupvalue)
 Return the name for the specified checkgroup value, or 'unknown' if no valid name for the value.
 
static checkgroup_value (string $checkgroupname)
 Return the value for the specified checkgroup name, or the unknown value if no valid value for the name.
 
static get_edit_url (\stdClass $componentinfo)
 Returns the moodle_url of the page to edit the error.
 

Public Attributes

const CHECKGROUP_FORM = 1
 Defines the form for the 'checkgroup' field in the tool_brickfield_checks table.
 
const CHECKGROUP_IMAGE = 2
 Defines the image for the 'checkgroup' field in the tool_brickfield_checks table.
 
const CHECKGROUP_LAYOUT = 3
 Defines the layout for the 'checkgroup' field in the tool_brickfield_checks table.
 
const CHECKGROUP_LINK = 4
 Defines the link for the 'checkgroup' field in the tool_brickfield_checks table.
 
const CHECKGROUP_MEDIA = 5
 Defines the media for the 'checkgroup' field in the tool_brickfield_checks table.
 
string[] const CHECKGROUP_NAMES
 Array for quick access of string names for 'checkgroups'.
 
const CHECKGROUP_TABLE = 6
 Defines the table for the 'checkgroup' field in the tool_brickfield_checks table.
 
const CHECKGROUP_TEXT = 7
 Defines the text for the 'checkgroup' field in the tool_brickfield_checks table.
 
const CHECKGROUP_UNKNOWN = 0
 Defines the unknown for the 'checkgroup' field in the tool_brickfield_checks table.
 
const TYPE_FIELD = 0
 Defines field value.
 
const TYPE_FILE = 1
 Defines file value.
 

Protected Member Functions

 find_fields_in_module_table (array $params=[])
 Helper method that can be used by the classes that define a field in the respective module table.
 
 get_type ()
 Return the defined content type.
 

Protected Attributes

string string $filter = ''
 To store the filter.
 
string $filterfieldname
 To store the filter field name.
 
array array $filterparams = []
 To store the filter parameters.
 

Member Function Documentation

◆ checkgroup_name()

static tool_brickfield\area_base::checkgroup_name ( int $checkgroupvalue)
staticfinalinherited

Return the name for the specified checkgroup value, or 'unknown' if no valid name for the value.

Preferably, use this rather than direct access to CHECKGROUP_NAMES, since it checks value boundaries.

Parameters
int$checkgroupvalue
Return values
string

◆ checkgroup_value()

static tool_brickfield\area_base::checkgroup_value ( string $checkgroupname)
staticfinalinherited

Return the value for the specified checkgroup name, or the unknown value if no valid value for the name.

Parameters
string$checkgroupname
Return values
int

◆ find_course_areas()

tool_brickfield\local\areas\module_area_base::find_course_areas ( int $courseid)
inherited

Find recordset of the course areas.

Parameters
int$courseid
Return values
moodle_recordset
Exceptions
coding_exception
dml_exception

Reimplemented from tool_brickfield\area_base.

◆ find_fields_in_module_table()

tool_brickfield\local\areas\module_area_base::find_fields_in_module_table ( array $params = [])
protectedinherited

Helper method that can be used by the classes that define a field in the respective module table.

Parameters
array$params
Return values
moodle_recordset
Exceptions
coding_exception
dml_exception

◆ find_relevant_areas()

tool_brickfield\local\areas\module_area_base::find_relevant_areas ( \core\event\base $event)
inherited

Find recordset of the relevant areas.

Parameters
core\event\base$event
Return values
moodle_recordset|null
Exceptions
coding_exception
dml_exception

Reimplemented from tool_brickfield\area_base.

◆ find_system_areas()

tool_brickfield\area_base::find_system_areas ( )
inherited

Return an array of area objects that contain content at the site and system levels only.

Override this where necessary.

Return values
moodle_recordset|null

Reimplemented in tool_brickfield\local\areas\core_course\base, tool_brickfield\local\areas\core_course\category_base, tool_brickfield\local\areas\core_question\answerbase, and tool_brickfield\local\areas\core_question\base.

◆ get_component()

tool_brickfield\area_base::get_component ( )
inherited

Return the component from the full class name.

Return values
mixed|string

◆ get_courseid_filtering()

tool_brickfield\area_base::get_courseid_filtering ( )
inherited

Processes any sql filtering data.

Implement in extensions.

Return values
null
Exceptions
coding_exception
dml_exception

◆ get_edit_url()

static tool_brickfield\local\areas\mod_book\base::get_edit_url ( \stdClass $componentinfo)
static

Returns the moodle_url of the page to edit the error.

Parameters
stdClass$componentinfo
Return values
moodle_url

Reimplemented from tool_brickfield\local\areas\module_area_base.

◆ get_fieldname()

tool_brickfield\area_base::get_fieldname ( )
abstractinherited

Return the name of the field in the table that has the content.

Return values
string

Reimplemented in tool_brickfield\local\areas\core_course\category_description, tool_brickfield\local\areas\core_course\category_name, tool_brickfield\local\areas\core_course\fullname, tool_brickfield\local\areas\core_course\sectionname, tool_brickfield\local\areas\core_course\sectionsummary, tool_brickfield\local\areas\core_course\shortname, tool_brickfield\local\areas\core_course\summary, tool_brickfield\local\areas\core_question\generalfeedback, tool_brickfield\local\areas\core_question\questionanswers, tool_brickfield\local\areas\core_question\questionfeedback, tool_brickfield\local\areas\core_question\questionname, tool_brickfield\local\areas\core_question\questiontext, tool_brickfield\local\areas\mod_assign\intro, tool_brickfield\local\areas\mod_assign\name, tool_brickfield\local\areas\mod_book\chaptercontent, tool_brickfield\local\areas\mod_book\chaptertitle, tool_brickfield\local\areas\mod_book\intro, tool_brickfield\local\areas\mod_book\name, tool_brickfield\local\areas\mod_chat\intro, tool_brickfield\local\areas\mod_chat\name, tool_brickfield\local\areas\mod_choice\intro, tool_brickfield\local\areas\mod_choice\name, tool_brickfield\local\areas\mod_choice\option, tool_brickfield\local\areas\mod_data\intro, tool_brickfield\local\areas\mod_data\name, tool_brickfield\local\areas\mod_feedback\intro, tool_brickfield\local\areas\mod_feedback\name, tool_brickfield\local\areas\mod_folder\intro, tool_brickfield\local\areas\mod_folder\name, tool_brickfield\local\areas\mod_forum\intro, tool_brickfield\local\areas\mod_forum\name, tool_brickfield\local\areas\mod_glossary\intro, tool_brickfield\local\areas\mod_glossary\name, tool_brickfield\local\areas\mod_imscp\intro, tool_brickfield\local\areas\mod_imscp\name, tool_brickfield\local\areas\mod_label\intro, tool_brickfield\local\areas\mod_lesson\answer_answer, tool_brickfield\local\areas\mod_lesson\answer_response, tool_brickfield\local\areas\mod_lesson\intro, tool_brickfield\local\areas\mod_lesson\name, tool_brickfield\local\areas\mod_lesson\pagecontent, tool_brickfield\local\areas\mod_lesson\pagetitle, tool_brickfield\local\areas\mod_lti\intro, tool_brickfield\local\areas\mod_lti\name, tool_brickfield\local\areas\mod_page\content, tool_brickfield\local\areas\mod_page\intro, tool_brickfield\local\areas\mod_page\name, tool_brickfield\local\areas\mod_quiz\intro, tool_brickfield\local\areas\mod_quiz\name, tool_brickfield\local\areas\mod_resource\intro, tool_brickfield\local\areas\mod_resource\name, tool_brickfield\local\areas\mod_scorm\intro, tool_brickfield\local\areas\mod_scorm\name, tool_brickfield\local\areas\mod_survey\intro, tool_brickfield\local\areas\mod_survey\name, tool_brickfield\local\areas\mod_url\intro, tool_brickfield\local\areas\mod_url\name, tool_brickfield\local\areas\mod_wiki\intro, tool_brickfield\local\areas\mod_wiki\name, tool_brickfield\local\areas\mod_workshop\intro, and tool_brickfield\local\areas\mod_workshop\name.

◆ get_ref_tablename()

◆ get_reftable_field_sql()

tool_brickfield\area_base::get_reftable_field_sql ( )
inherited

The standard Moodle parameter DML parameter substitution doesn't work on all versions of MySQL or Postgres, so we need to use inline function substitution to ensure that the left side is a string.

Return values
string

◆ get_standard_area_fields_sql()

tool_brickfield\area_base::get_standard_area_fields_sql ( )
inherited

The standard Moodle parameter DML parameter substitution doesn't work on all versions of MySQL or Postgres, so we need to use inline function substitution to ensure that the left side is a string.

Return values
string

◆ get_tablename()

tool_brickfield\area_base::get_tablename ( )
abstractinherited

Return the name of the database table where information is stored.

Return values
string

Reimplemented in tool_brickfield\local\areas\core_course\category_description, tool_brickfield\local\areas\core_course\category_name, tool_brickfield\local\areas\core_course\fullname, tool_brickfield\local\areas\core_course\sectionname, tool_brickfield\local\areas\core_course\sectionsummary, tool_brickfield\local\areas\core_course\shortname, tool_brickfield\local\areas\core_course\summary, tool_brickfield\local\areas\core_question\generalfeedback, tool_brickfield\local\areas\core_question\questionanswers, tool_brickfield\local\areas\core_question\questionfeedback, tool_brickfield\local\areas\core_question\questionname, tool_brickfield\local\areas\core_question\questiontext, tool_brickfield\local\areas\mod_assign\intro, tool_brickfield\local\areas\mod_assign\name, tool_brickfield\local\areas\mod_book\chaptercontent, tool_brickfield\local\areas\mod_book\chaptertitle, tool_brickfield\local\areas\mod_book\intro, tool_brickfield\local\areas\mod_book\name, tool_brickfield\local\areas\mod_chat\intro, tool_brickfield\local\areas\mod_chat\name, tool_brickfield\local\areas\mod_choice\intro, tool_brickfield\local\areas\mod_choice\name, tool_brickfield\local\areas\mod_choice\option, tool_brickfield\local\areas\mod_data\intro, tool_brickfield\local\areas\mod_data\name, tool_brickfield\local\areas\mod_feedback\intro, tool_brickfield\local\areas\mod_feedback\name, tool_brickfield\local\areas\mod_folder\intro, tool_brickfield\local\areas\mod_folder\name, tool_brickfield\local\areas\mod_forum\intro, tool_brickfield\local\areas\mod_forum\name, tool_brickfield\local\areas\mod_glossary\intro, tool_brickfield\local\areas\mod_glossary\name, tool_brickfield\local\areas\mod_imscp\intro, tool_brickfield\local\areas\mod_imscp\name, tool_brickfield\local\areas\mod_label\intro, tool_brickfield\local\areas\mod_lesson\answer_answer, tool_brickfield\local\areas\mod_lesson\answer_response, tool_brickfield\local\areas\mod_lesson\intro, tool_brickfield\local\areas\mod_lesson\name, tool_brickfield\local\areas\mod_lesson\pagecontent, tool_brickfield\local\areas\mod_lesson\pagetitle, tool_brickfield\local\areas\mod_lti\intro, tool_brickfield\local\areas\mod_lti\name, tool_brickfield\local\areas\mod_page\content, tool_brickfield\local\areas\mod_page\intro, tool_brickfield\local\areas\mod_page\name, tool_brickfield\local\areas\mod_quiz\intro, tool_brickfield\local\areas\mod_quiz\name, tool_brickfield\local\areas\mod_resource\intro, tool_brickfield\local\areas\mod_resource\name, tool_brickfield\local\areas\mod_scorm\intro, tool_brickfield\local\areas\mod_scorm\name, tool_brickfield\local\areas\mod_survey\intro, tool_brickfield\local\areas\mod_survey\name, tool_brickfield\local\areas\mod_url\intro, tool_brickfield\local\areas\mod_url\name, tool_brickfield\local\areas\mod_wiki\intro, tool_brickfield\local\areas\mod_wiki\name, tool_brickfield\local\areas\mod_workshop\intro, and tool_brickfield\local\areas\mod_workshop\name.

◆ get_type()

tool_brickfield\area_base::get_type ( )
protectedinherited

Return the defined content type.

Return values
int

◆ is_available()

tool_brickfield\area_base::is_available ( )
inherited

Check if the system plugin is avaliable.

Return values
bool

Member Data Documentation

◆ CHECKGROUP_NAMES

string [] const tool_brickfield\area_base::CHECKGROUP_NAMES
inherited
Initial value:
= [
self::CHECKGROUP_UNKNOWN => 'unknown',
self::CHECKGROUP_FORM => 'form',
self::CHECKGROUP_IMAGE => 'image',
self::CHECKGROUP_LAYOUT => 'layout',
self::CHECKGROUP_LINK => 'link',
self::CHECKGROUP_MEDIA => 'media',
self::CHECKGROUP_TABLE => 'table',
self::CHECKGROUP_TEXT => 'text'
]

Array for quick access of string names for 'checkgroups'.


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