Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
core\output\datafilter Class Reference
Inheritance diagram for core\output\datafilter:
core\output\renderable core\output\templatable core_question\output\question_bank_filter_ui core_user\output\participants_filter

Public Member Functions

 __construct (context $context, ?string $tableregionid=null)
 Filter constructor.
 
 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 JOINTYPE_ALL = 2
 All of the following match.
 
int const JOINTYPE_ANY = 1
 Any of the following match.
 
int const JOINTYPE_NONE = 0
 None of the following match.
 

Protected Member Functions

 get_filter_object (string $name, string $title, bool $custom, bool $multiple, ?string $filterclass, array $values, bool $allowempty=false, ?stdClass $filteroptions=null, bool $required=false, array $joinlist=[self::JOINTYPE_NONE, self::JOINTYPE_ANY, self::JOINTYPE_ALL])
 Get a standardised filter object.
 
 get_filtertypes ()
 Get data for all filter types.
 

Protected Attributes

context $context
 $context The context where the filters are being rendered.
 
stdClass $course
 $course The course shown
 
string $tableregionid
 $tableregionid Container of the table to be updated by this filter, is used to retrieve the table
 

Constructor & Destructor Documentation

◆ __construct()

core\output\datafilter::__construct ( context $context,
?string $tableregionid = null )

Filter constructor.

Parameters
context$contextThe context where the filters are being rendered
string | null$tableregionidContainer of the table which will be updated by this filter

Member Function Documentation

◆ export_for_template()

core\output\templatable::export_for_template ( renderer_base $output)
inherited

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

Implemented in core\output\action_menu, core\output\actions\component_action, core\output\activity_header, core\output\checkbox_toggleall, core\output\choicelist, core\output\chooser, core\output\chooser_item, core\output\chooser_section, core\output\comboboxsearch, core\output\context_header, core\output\custom_menu_item, core\output\dynamic_tabs, core\output\help_icon, core\output\initials_bar, core\output\paging_bar, core\output\pix_icon, core\output\pix_icon_font, core\output\progress_bar, core\output\select_menu, core\output\single_select, core\output\tabobject, core\output\tabtree, core\output\task_indicator, core\output\url_select, core_calendar\output\humandate, core_calendar\output\humantimeperiod, core_course\output\actionbar\group_selector_button, core_course\output\actionbar\group_selector_dropdown_form, core_course\output\actionbar\initials_dropdown_form, core_course\output\actionbar\user_selector_button, core_course\output\activity_completion, core_course\output\activity_dates, core_course\output\activity_icon, core_course\output\activitychooserbutton, core_course\output\completion_action_bar, core_courseformat\output\local\content\basecontrolmenu, core_courseformat\output\local\content\cm\controlmenu, core_courseformat\output\local\content\cm, core_courseformat\output\local\content\section, core_courseformat\output\local\overview\activityname, core_courseformat\output\local\overview\overviewtable, core_grades\output\penalty_indicator, core_question\output\add_bank_list, core_question\output\qbank_action_menu, core_question\output\question_bank_filter_ui, core_question\output\question_bank_list, core_question\output\question_category_selector, core_question\output\question_version_info, core_question\output\question_version_selection, core_question\output\switch_question_bank, core_question\output\view_banks, core_reportbuilder\output\custom_report, core_reportbuilder\output\dynamictabs\access, core_reportbuilder\output\dynamictabs\audience, core_reportbuilder\output\dynamictabs\editor, core_reportbuilder\output\dynamictabs\schedules, core_reportbuilder\output\report_action, and core_reportbuilder\output\system_report.

◆ get_filter_object()

core\output\datafilter::get_filter_object ( string $name,
string $title,
bool $custom,
bool $multiple,
?string $filterclass,
array $values,
bool $allowempty = false,
?stdClass $filteroptions = null,
bool $required = false,
array $joinlist = [self::JOINTYPE_NONE, self::JOINTYPE_ANY, self::JOINTYPE_ALL] )
protected

Get a standardised filter object.

Parameters
string$name
string$title
bool$custom
bool$multiple
string | null$filterclass
array$values
bool$allowempty
Return values
stdClass|null

◆ get_filtertypes()

core\output\datafilter::get_filtertypes ( )
abstractprotected

Get data for all filter types.

Return values
array

Reimplemented in core_question\output\question_bank_filter_ui, and core_user\output\participants_filter.


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