Privacy class for requesting user data.  
 More...
|  | 
| static | delete_comments_for_all_users (\context $context, string $component, string $commentarea=null, int $itemid=null) | 
|  | Deletes all comments for a specified context, component, and commentarea. 
 | 
|  | 
| static | delete_comments_for_all_users_select (\context $context, string $component, string $commentarea, $itemidstest, $params=[]) | 
|  | Deletes all comments for a specified context, component, and commentarea. 
 | 
|  | 
| static | delete_comments_for_user (\core_privacy\local\request\approved_contextlist $contextlist, string $component, string $commentarea=null, int $itemid=null) | 
|  | Deletes all records for a user from a list of approved contexts. 
 | 
|  | 
| static | delete_comments_for_users (\core_privacy\local\request\approved_userlist $userlist, string $component, string $commentarea=null, int $itemid=null) | 
|  | Deletes all records for a context from a list of approved users. 
 | 
|  | 
| static | export_comments (\context $context, string $component, string $commentarea, int $itemid, array $subcontext, bool $onlyforthisuser=true) | 
|  | Writes user data to the writer for the user to download. 
 | 
|  | 
| static | get_metadata (collection $collection) | 
|  | Returns meta data about this system. 
 | 
|  | 
| static | get_users_in_context_from_sql (userlist $userlist, string $alias, string $component, string $area, int $contextid=null, string $insql='', array $params=[]) | 
|  | Add the list of users who have commented in the specified constraints. 
 | 
|  | 
Privacy class for requesting user data. 
- Copyright
- 2018 Adrian Greeve adria.nosp@m.n@mo.nosp@m.odle..nosp@m.com 
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ delete_comments_for_all_users()
  
  | 
        
          | static core_comment\privacy\provider::delete_comments_for_all_users | ( | \context | $context, |  
          |  |  | string | $component, |  
          |  |  | string | $commentarea = null, |  
          |  |  | int | $itemid = null ) |  | static | 
 
Deletes all comments for a specified context, component, and commentarea. 
- Parameters
- 
  
    | context | $context | Details about which context to delete comments for. |  | string | $component | Component to delete. |  | string | $commentarea | Comment area to delete. |  | int | $itemid | The item ID for use with deletion. |  
 
 
 
◆ delete_comments_for_all_users_select()
  
  | 
        
          | static core_comment\privacy\provider::delete_comments_for_all_users_select | ( | \context | $context, |  
          |  |  | string | $component, |  
          |  |  | string | $commentarea, |  
          |  |  |  | $itemidstest, |  
          |  |  |  | $params = [] ) |  | static | 
 
Deletes all comments for a specified context, component, and commentarea. 
- Parameters
- 
  
    | context | $context | Details about which context to delete comments for. |  | string | $component | Component to delete. |  | string | $commentarea | Comment area to delete. |  | string | $itemidstest | an SQL fragment that the itemid must match. Used in the query like WHERE itemid $itemidstest. Must use named parameters, and may not use named parameters called contextid, component or commentarea. |  | array | $params | any query params used by $itemidstest. |  
 
 
 
◆ delete_comments_for_user()
Deletes all records for a user from a list of approved contexts. 
- Parameters
- 
  
    | core_privacy\local\request\approved_contextlist | $contextlist | Contains the user ID and a list of contexts to be deleted from. |  | string | $component | Component to delete from. |  | string | $commentarea | Area to delete from. |  | int | $itemid | The item id to delete from. |  
 
 
 
◆ delete_comments_for_users()
Deletes all records for a context from a list of approved users. 
- Parameters
- 
  
    | core_privacy\local\request\approved_userlist | $userlist | Contains the list of users and a context to be deleted from. |  | string | $component | Component to delete from. |  | string | $commentarea | Area to delete from. |  | int | $itemid | The item id to delete from. |  
 
 
 
◆ export_comments()
  
  | 
        
          | static core_comment\privacy\provider::export_comments | ( | \context | $context, |  
          |  |  | string | $component, |  
          |  |  | string | $commentarea, |  
          |  |  | int | $itemid, |  
          |  |  | array | $subcontext, |  
          |  |  | bool | $onlyforthisuser = true ) |  | static | 
 
Writes user data to the writer for the user to download. 
- Parameters
- 
  
    | context | $context | The context to export data for. |  | string | $component | The component that is calling this function |  | string | $commentarea | The comment area related to the component |  | int | $itemid | An identifier for a group of comments |  | array | $subcontext | The sub-context in which to export this data |  | bool | $onlyforthisuser | Only return the comments this user made. |  
 
 
 
◆ get_metadata()
  
  | 
        
          | static core_comment\privacy\provider::get_metadata | ( | collection | $collection | ) |  |  | static | 
 
Returns meta data about this system. 
- Parameters
- 
  
    | collection | $collection | The initialised collection to add items to. |  
 
- Return values
- 
  
    | collection | A listing of user data stored through this system. |  
 
Implements core_privacy\local\metadata\provider.
 
 
◆ get_users_in_context_from_sql()
  
  | 
        
          | static core_comment\privacy\provider::get_users_in_context_from_sql | ( | userlist | $userlist, |  
          |  |  | string | $alias, |  
          |  |  | string | $component, |  
          |  |  | string | $area, |  
          |  |  | int | $contextid = null, |  
          |  |  | string | $insql = '', |  
          |  |  | array | $params = [] ) |  | static | 
 
Add the list of users who have commented in the specified constraints. 
- Parameters
- 
  
    | userlist | $userlist | The userlist to add the users to. |  | string | $alias | An alias prefix to use for comment selects to avoid interference with your own sql. |  | string | $component | The component to check. |  | string | $area | The comment area to check. |  | int | $contextid | The context id. |  | string | $insql | The SQL to use in a sub-select for the itemid query. |  | array | $params | The params required for the insql. |  
 
 
 
The documentation for this class was generated from the following file: