A collection of contextlist items.
More...
|
| | __construct ($userid) |
| | Constructor to create a new contextlist_collection.
|
| |
| | add_contextlist (contextlist_base $contextlist) |
| | Add a contextlist to this collection.
|
| |
|
| count () |
| | Return the number of contexts.
|
| |
| | current () |
| | Return the current contexlist.
|
| |
| | get_contextlist_for_component (string $component) |
| | Get the contextlist for the specified component.
|
| |
| | get_contextlists () |
| | Get the contextlists in this collection.
|
| |
| | get_userid () |
| | Return the ID of the user whose collection this is.
|
| |
| | key () |
| | Return the key of the current element.
|
| |
|
| next () |
| | Move to the next context in the list.
|
| |
| | rewind () |
| | Rewind to the first found context.
|
| |
| | valid () |
| | Check if the current position is valid.
|
| |
|
|
array | $contextlists = [] |
| | $contextlists the internal array of contextlist objects.
|
| |
|
int | $iteratorposition = 0 |
| | Current position of the iterator.
|
| |
|
int | $userid = null |
| | $userid The ID of the user that the contextlist collection belongs to.
|
| |
A collection of contextlist items.
- Copyright
- 2018 Jake Dallimore jrhda.nosp@m.llim.nosp@m.ore@g.nosp@m.mail.nosp@m..com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
| core_privacy\local\request\contextlist_collection::__construct |
( |
| $userid | ) |
|
Constructor to create a new contextlist_collection.
- Parameters
-
| int | $userid | The userid to which this collection belongs. |
◆ add_contextlist()
| core_privacy\local\request\contextlist_collection::add_contextlist |
( |
contextlist_base | $contextlist | ) |
|
Add a contextlist to this collection.
- Parameters
-
| contextlist_base | $contextlist | the contextlist to export. |
- Return values
-
◆ current()
| core_privacy\local\request\contextlist_collection::current |
( |
| ) |
|
Return the current contexlist.
- Return values
-
◆ get_contextlist_for_component()
| core_privacy\local\request\contextlist_collection::get_contextlist_for_component |
( |
string | $component | ) |
|
Get the contextlist for the specified component.
- Parameters
-
| string | $component | the frankenstyle name of the component to fetch for. |
- Return values
-
◆ get_contextlists()
| core_privacy\local\request\contextlist_collection::get_contextlists |
( |
| ) |
|
Get the contextlists in this collection.
- Return values
-
| array | the associative array of contextlists in this collection, indexed by component name. E.g. mod_assign => contextlist, core_comment => contextlist. |
◆ get_key_from_position()
| core_privacy\local\request\contextlist_collection::get_key_from_position |
( |
| ) |
|
|
protected |
Get the key for the current iterator position.
- Return values
-
◆ get_userid()
| core_privacy\local\request\contextlist_collection::get_userid |
( |
| ) |
|
Return the ID of the user whose collection this is.
- Return values
-
◆ key()
| core_privacy\local\request\contextlist_collection::key |
( |
| ) |
|
Return the key of the current element.
- Return values
-
◆ rewind()
| core_privacy\local\request\contextlist_collection::rewind |
( |
| ) |
|
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.
◆ valid()
| core_privacy\local\request\contextlist_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/contextlist_collection.php