Expiry Data.
More...
|
bool | $defaultexpiryreached = false |
| Whether the default expiry value of this purpose has been reached.
|
|
bool | $defaultprotected = false |
| Whether the default purpose is protected.
|
|
int[] | $expired = [] |
| List of expires roles.
|
|
bool | $fullyexpired = false |
| Whether this context is fully expired.
|
|
int[] | $protectedroles = [] |
| List of unexpired roles which are also protected.
|
|
int[] | $unexpired = [] |
| List of unexpires roles.
|
|
◆ __construct()
tool_dataprivacy\expiry_info::__construct |
( |
bool |
$default, |
|
|
bool |
$defaultprotected, |
|
|
array |
$expired, |
|
|
array |
$unexpired, |
|
|
array |
$protectedroles |
|
) |
| |
Constructor for the expiry_info class.
- Parameters
-
bool | $default | Whether the default expiry period for this context has been reached. |
bool | $defaultprotected | Whether the default expiry is protected. |
int[] | $expired | A list of roles in this context which have explicitly expired. |
int[] | $unexpired | A list of roles in this context which have not yet expired. |
int[] | $protectedroles | A list of unexpired roles in this context which are protected. |
◆ get_expired_roles()
tool_dataprivacy\expiry_info::get_expired_roles |
( |
| ) |
|
Get the list of explicitly expired role IDs.
Note: This does not list roles which have been expired via the default retention policy being reached.
- Return values
-
◆ get_unexpired_protected_roles()
tool_dataprivacy\expiry_info::get_unexpired_protected_roles |
( |
| ) |
|
Get the list of unexpired protected roles.
- Return values
-
◆ get_unexpired_roles()
tool_dataprivacy\expiry_info::get_unexpired_roles |
( |
| ) |
|
Get the list of unexpired role IDs.
- Return values
-
◆ get_unprotected_overridden_roles()
tool_dataprivacy\expiry_info::get_unprotected_overridden_roles |
( |
| ) |
|
Get a list of all overridden roles which are unprotected.
- Return values
-
◆ is_any_expired()
tool_dataprivacy\expiry_info::is_any_expired |
( |
| ) |
|
Whether any part of this context has expired.
- Return values
-
◆ is_default_expired()
tool_dataprivacy\expiry_info::is_default_expired |
( |
| ) |
|
Whether the default retention policy has been reached.
- Return values
-
◆ is_default_protected()
tool_dataprivacy\expiry_info::is_default_protected |
( |
| ) |
|
Whether the default purpose is protected.
- Return values
-
◆ is_fully_expired()
tool_dataprivacy\expiry_info::is_fully_expired |
( |
| ) |
|
Whether this context has 'fully' expired.
That is to say that the default retention period has been reached, and that there are no unexpired roles.
- Return values
-
◆ is_role_expired()
tool_dataprivacy\expiry_info::is_role_expired |
( |
int |
$roleid | ) |
|
Check whether the specified role is explicitly expired.
Note: This does not list roles which have been expired via the default retention policy being reached.
- Parameters
-
- Return values
-
◆ merge_with_child()
tool_dataprivacy\expiry_info::merge_with_child |
( |
expiry_info |
$child | ) |
|
Merge this expiry_info object with another belonging to a child context in order to set the 'safest' heritage.
It is not possible to delete any part of a context that is not deleted by a parent. So if a course's retention policy has been reached, then only parts where the children have also expired can be deleted.
- Parameters
-
- Return values
-
The documentation for this class was generated from the following file: