A collection of userlist items.
More...
|
| | __construct (\context $context) |
| | Constructor to create a new userlist_collection.
|
| |
| | add_userlist (userlist_base $userlist) |
| | Add a userlist to this collection.
|
| |
|
| count () |
| | Return the number of users.
|
| |
| | current () |
| | Return the current contexlist.
|
| |
| | get_context () |
| | Return the context that this collection relates to.
|
| |
| | get_userlist_for_component (string $component) |
| | Get the userlist for the specified component.
|
| |
| | get_userlists () |
| | Get the userlists in this collection.
|
| |
| | key () |
| | Return the key of the current element.
|
| |
|
| next () |
| | Move to the next user in the list.
|
| |
| | rewind () |
| | Rewind to the first found user.
|
| |
| | valid () |
| | Check if the current position is valid.
|
| |
|
|
context | $context = null |
| | $context The context that the userlist collection belongs to.
|
| |
|
int | $iteratorposition = 0 |
| | Current position of the iterator.
|
| |
|
array | $userlists = [] |
| | $userlists the internal array of userlist objects.
|
| |
A collection of userlist items.
- Copyright
- 2018 Andrew Nicols andre.nosp@m.w@ni.nosp@m.cols..nosp@m.co.u.nosp@m.k
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
| core_privacy\local\request\userlist_collection::__construct |
( |
\context | $context | ) |
|
Constructor to create a new userlist_collection.
- Parameters
-
| context | $context | The context to which this collection belongs. |
◆ add_userlist()
| core_privacy\local\request\userlist_collection::add_userlist |
( |
userlist_base | $userlist | ) |
|
Add a userlist to this collection.
- Parameters
-
| userlist_base | $userlist | the userlist to export. |
- Return values
-
◆ current()
| core_privacy\local\request\userlist_collection::current |
( |
| ) |
|
Return the current contexlist.
- Return values
-
◆ get_context()
| core_privacy\local\request\userlist_collection::get_context |
( |
| ) |
|
Return the context that this collection relates to.
- Return values
-
◆ get_key_from_position()
| core_privacy\local\request\userlist_collection::get_key_from_position |
( |
| ) |
|
|
protected |
Get the key for the current iterator position.
- Return values
-
◆ get_userlist_for_component()
| core_privacy\local\request\userlist_collection::get_userlist_for_component |
( |
string | $component | ) |
|
Get the userlist for the specified component.
- Parameters
-
| string | $component | the frankenstyle name of the component to fetch for. |
- Return values
-
◆ get_userlists()
| core_privacy\local\request\userlist_collection::get_userlists |
( |
| ) |
|
Get the userlists in this collection.
- Return values
-
| array | the associative array of userlists in this collection, indexed by component name. E.g. mod_assign => userlist, core_comment => userlist. |
◆ key()
| core_privacy\local\request\userlist_collection::key |
( |
| ) |
|
Return the key of the current element.
- Return values
-
◆ rewind()
| core_privacy\local\request\userlist_collection::rewind |
( |
| ) |
|
Rewind to the first found user.
The list of users is uniqued during the rewind. The rewind is called at the start of most iterations.
◆ valid()
| core_privacy\local\request\userlist_collection::valid |
( |
| ) |
|
Check if the current position is valid.
- Return values
-
The documentation for this class was generated from the following file:
- privacy/classes/local/request/userlist_collection.php