Site policy management class.
More...
|
| accept () |
| Accept site policy for the current user.
|
|
| get_all_handlers () |
| Returns the list of plugins that can work as sitepolicy handlers (have class PLUGINNAME\privacy\sitepolicy\handler)
|
|
| get_embed_url ($forguests=false) |
| Returns URL of the site policy that needs to be displayed to the user (inside iframe or to use in WS such as mobile app)
|
|
| get_handler_classname () |
| Returns the current site policy handler.
|
|
| get_redirect_url ($forguests=false) |
| Returns URL to redirect user to when user needs to agree to site policy.
|
|
| is_defined ($forguests=false) |
| Checks if the site has site policy defined.
|
|
| signup_form ($mform) |
| Adds "Agree to site policy" checkbox to the signup form.
|
|
Site policy management class.
- Copyright
- 2018 Marina Glancy
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ accept()
core_privacy\local\sitepolicy\manager::accept |
( |
| ) |
|
Accept site policy for the current user.
- Return values
-
bool | - false if sitepolicy not defined, user is not logged in or user has already agreed to site policy; true - if we have successfully marked the user as agreed to the site policy |
◆ get_all_handlers()
core_privacy\local\sitepolicy\manager::get_all_handlers |
( |
| ) |
|
Returns the list of plugins that can work as sitepolicy handlers (have class PLUGINNAME\privacy\sitepolicy\handler)
- Return values
-
◆ get_embed_url()
core_privacy\local\sitepolicy\manager::get_embed_url |
( |
| $forguests = false | ) |
|
Returns URL of the site policy that needs to be displayed to the user (inside iframe or to use in WS such as mobile app)
This page should not have any header/footer, it does not also have any buttons/checkboxes. The caller needs to implement the "Accept" button and call self::accept() on completion.
- Parameters
-
- Return values
-
◆ get_handler_classname()
core_privacy\local\sitepolicy\manager::get_handler_classname |
( |
| ) |
|
Returns the current site policy handler.
- Return values
-
◆ get_redirect_url()
core_privacy\local\sitepolicy\manager::get_redirect_url |
( |
| $forguests = false | ) |
|
Returns URL to redirect user to when user needs to agree to site policy.
This is a regular interactive page for web users. It should have normal Moodle header/footers, it should allow user to view policies and accept them.
- Parameters
-
- Return values
-
moodle_url|null | (returns null if site policy is not defined) |
◆ is_defined()
core_privacy\local\sitepolicy\manager::is_defined |
( |
| $forguests = false | ) |
|
Checks if the site has site policy defined.
- Parameters
-
- Return values
-
◆ signup_form()
core_privacy\local\sitepolicy\manager::signup_form |
( |
| $mform | ) |
|
Adds "Agree to site policy" checkbox to the signup form.
Sitepolicy handlers can override the simple checkbox with their own controls.
- Parameters
-
The documentation for this class was generated from the following file:
- privacy/classes/local/sitepolicy/manager.php