Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_reportbuilder\permission Class Reference

Static Public Member Functions

static can_create_report (?int $userid=null, ?context $context=null)
 Whether given user can create a new report.
 
static can_edit_report (report $report, ?int $userid=null)
 Whether given user can edit report.
 
static can_view_report (report $report, ?int $userid=null)
 Whether given user can view report.
 
static can_view_reports_list (?int $userid=null, ?context $context=null)
 Whether given user can view reports list.
 
static require_can_create_report (?int $userid=null, ?context $context=null)
 Require given user can create a new report.
 
static require_can_edit_report (report $report, ?int $userid=null)
 Require given user can edit report.
 
static require_can_view_report (report $report, ?int $userid=null)
 Require given user can view report.
 
static require_can_view_reports_list (?int $userid=null, ?context $context=null)
 Require given user can view reports list.
 

Member Function Documentation

◆ can_create_report()

static core_reportbuilder\permission::can_create_report ( ?int $userid = null,
?context $context = null )
static

Whether given user can create a new report.

Parameters
int | null$useridUser ID to check, or the current user if omitted
context | null$context
Return values
bool

◆ can_edit_report()

static core_reportbuilder\permission::can_edit_report ( report $report,
?int $userid = null )
static

Whether given user can edit report.

Parameters
report$report
int | null$useridUser ID to check, or the current user if omitted
Return values
bool

◆ can_view_report()

static core_reportbuilder\permission::can_view_report ( report $report,
?int $userid = null )
static

Whether given user can view report.

Parameters
report$report
int | null$useridUser ID to check, or the current user if omitted
Return values
bool

◆ can_view_reports_list()

static core_reportbuilder\permission::can_view_reports_list ( ?int $userid = null,
?context $context = null )
static

Whether given user can view reports list.

Parameters
int | null$useridUser ID to check, or the current user if omitted
context | null$context
Return values
bool

◆ require_can_create_report()

static core_reportbuilder\permission::require_can_create_report ( ?int $userid = null,
?context $context = null )
static

Require given user can create a new report.

Parameters
int | null$useridUser ID to check, or the current user if omitted
context | null$context
Exceptions
report_access_exception

◆ require_can_edit_report()

static core_reportbuilder\permission::require_can_edit_report ( report $report,
?int $userid = null )
static

Require given user can edit report.

Parameters
report$report
int | null$useridUser ID to check, or the current user if omitted
Exceptions
report_access_exception

◆ require_can_view_report()

static core_reportbuilder\permission::require_can_view_report ( report $report,
?int $userid = null )
static

Require given user can view report.

Parameters
report$report
int | null$useridUser ID to check, or the current user if omitted
Exceptions
report_access_exception

◆ require_can_view_reports_list()

static core_reportbuilder\permission::require_can_view_reports_list ( ?int $userid = null,
?context $context = null )
static

Require given user can view reports list.

Parameters
int | null$useridUser ID to check, or the current user if omitted
context | null$context
Exceptions
report_access_exception

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