Privacy Fetch Result Set.
More...
|
| add_from_sql (string $sql, array $params) |
| Add a set of contexts from SQL.
|
|
| add_system_context () |
| Adds the system context.
|
|
| add_user_context (int $userid) |
| Adds the user context for a given user.
|
|
| add_user_contexts (array $userids) |
| Adds the user contexts for given users.
|
|
| count () |
| Return the number of contexts.
|
|
| current () |
| Return the current context.
|
|
| get_component () |
| Get the name of the component to which this contextlist belongs.
|
|
| get_contextids () |
| Get the list of context IDs that relate to this request.
|
|
| get_contexts () |
| Get the complete list of context objects that relate to this request.
|
|
| key () |
| Return the key of the current element.
|
|
| next () |
| Move to the next context in the list.
|
|
| rewind () |
| Rewind to the first found context.
|
|
| set_component ($component) |
| Sets the component for this contextlist.
|
|
| valid () |
| Check if the current position is valid.
|
|
|
string | $component = '' |
| component the frankenstyle component name.
|
|
int | $iteratorposition = 0 |
| Current position of the iterator.
|
|
◆ add_from_sql()
core_privacy\local\request\contextlist::add_from_sql |
( |
string | $sql, |
|
|
array | $params ) |
Add a set of contexts from SQL.
The SQL should only return a list of context IDs.
- Parameters
-
string | $sql | The SQL which will fetch the list of * context IDs |
array | $params | The set of SQL parameters |
- Return values
-
◆ add_system_context()
core_privacy\local\request\contextlist::add_system_context |
( |
| ) |
|
Adds the system context.
- Return values
-
◆ add_user_context()
core_privacy\local\request\contextlist::add_user_context |
( |
int | $userid | ) |
|
Adds the user context for a given user.
- Parameters
-
- Return values
-
◆ add_user_contexts()
core_privacy\local\request\contextlist::add_user_contexts |
( |
array | $userids | ) |
|
Adds the user contexts for given users.
- Parameters
-
- Return values
-
◆ current()
core_privacy\local\request\contextlist_base::current |
( |
| ) |
|
|
inherited |
Return the current context.
- Return values
-
◆ get_component()
core_privacy\local\request\contextlist_base::get_component |
( |
| ) |
|
|
inherited |
Get the name of the component to which this contextlist belongs.
- Return values
-
string | the component name associated with this contextlist. |
◆ get_contextids()
core_privacy\local\request\contextlist_base::get_contextids |
( |
| ) |
|
|
inherited |
Get the list of context IDs that relate to this request.
- Return values
-
◆ get_contexts()
core_privacy\local\request\contextlist_base::get_contexts |
( |
| ) |
|
|
inherited |
Get the complete list of context objects that relate to this request.
- Return values
-
◆ guess_id_field_from_sql()
core_privacy\local\request\contextlist::guess_id_field_from_sql |
( |
string | $sql | ) |
|
|
protected |
Guess the name of the contextid field from the supplied SQL.
- Parameters
-
string | $sql | The SQL to guess from |
- Return values
-
string | The field name or a numeric value representing the context id |
◆ key()
core_privacy\local\request\contextlist_base::key |
( |
| ) |
|
|
inherited |
Return the key of the current element.
- Return values
-
◆ rewind()
core_privacy\local\request\contextlist_base::rewind |
( |
| ) |
|
|
inherited |
Rewind to the first found context.
The list of contexts is uniqued during the rewind. The rewind is called at the start of most iterations.
◆ set_component()
core_privacy\local\request\contextlist::set_component |
( |
| $component | ) |
|
◆ set_contextids()
core_privacy\local\request\contextlist_base::set_contextids |
( |
array | $contextids | ) |
|
|
protectedinherited |
Set the contextids.
- Parameters
-
array | $contextids | The list of contexts. |
◆ valid()
core_privacy\local\request\contextlist_base::valid |
( |
| ) |
|
|
inherited |
Check if the current position is valid.
- Return values
-
The documentation for this class was generated from the following file:
- privacy/classes/local/request/contextlist.php