A collection of contextlist items.
More...
|
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
-
- 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: