Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
tool_brickfield\local\areas\mod_resource\intro Class Reference
Inheritance diagram for tool_brickfield\local\areas\mod_resource\intro:
tool_brickfield\local\areas\module_area_base tool_brickfield\area_base

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 ()
 Get field name.
 
 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 ()
 Get table name.
 
 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\module_area_base::get_edit_url ( \stdClass $componentinfo)
staticinherited

Returns the moodle_url of the page to edit the error.

Parameters
stdClass$componentinfo
Return values
moodle_url

Reimplemented in tool_brickfield\local\areas\mod_book\base, and tool_brickfield\local\areas\mod_lesson\base.

◆ get_fieldname()

tool_brickfield\local\areas\mod_resource\intro::get_fieldname ( )

Get field name.

Return values
string

Reimplemented from tool_brickfield\area_base.

◆ 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\local\areas\mod_resource\intro::get_tablename ( )

Get table name.

Return values
string

Reimplemented from tool_brickfield\area_base.

◆ 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: