Base class for site policy handlers.
More...
|
static | accept () |
| Accept site policy for the current user.
|
|
static | 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)
|
|
static | get_redirect_url ($forguests=false) |
| Returns URL to redirect user to when user needs to agree to site policy.
|
|
static | is_defined ($forguests=false) |
| Checks if the site has site policy defined.
|
|
static | signup_form ($mform) |
| Adds "Agree to site policy" checkbox to the signup form.
|
|
Base class for site policy handlers.
If a plugin wants to act as a site policy handler it has to define class PLUGINNAME\privacy\sitepolicy\handler that extends core_privacy\sitepolicy\handler
- Copyright
- 2018 Marina Glancy
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ accept()
static core_privacy\local\sitepolicy\handler::accept |
( |
| ) |
|
|
static |
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 |
Reimplemented in tool_policy\privacy\local\sitepolicy\handler.
◆ get_embed_url()
static core_privacy\local\sitepolicy\handler::get_embed_url |
( |
| $forguests = false | ) |
|
|
staticabstract |
◆ get_redirect_url()
static core_privacy\local\sitepolicy\handler::get_redirect_url |
( |
| $forguests = false | ) |
|
|
staticabstract |
◆ is_defined()
static core_privacy\local\sitepolicy\handler::is_defined |
( |
| $forguests = false | ) |
|
|
static |
◆ signup_form()
static core_privacy\local\sitepolicy\handler::signup_form |
( |
| $mform | ) |
|
|
static |
The documentation for this class was generated from the following file:
- privacy/classes/local/sitepolicy/handler.php