Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
core_privacy\tests\request\approved_contextlist Class Reference

Privacy Fetch Result Set. More...

Inheritance diagram for core_privacy\tests\request\approved_contextlist:
core_privacy\local\request\approved_contextlist core_privacy\local\request\contextlist_base

Public Member Functions

 add_context (\context $context)
 Add a single context to this approved_contextlist. More...
 
 add_context_by_id ($contextid)
 Add a single context to this approved_contextlist by it's ID. More...
 
 add_contexts (array $contexts)
 Add a set of contexts to this approved_contextlist. More...
 
 add_contexts_by_id (array $contexts)
 Add a set of contexts to this approved_contextlist by ID. More...
 
 count ()
 Return the number of contexts.
 
 current ()
 Return the current context. More...
 
 get_component ()
 Get the name of the component to which this contextlist belongs. More...
 
 get_contextids ()
 Get the list of context IDs that relate to this request. More...
 
 get_contexts ()
 Get the complete list of context objects that relate to this request. More...
 
 get_user ()
 Get the user which requested their data. More...
 
 key ()
 Return the key of the current element. More...
 
 next ()
 Move to the next context in the list.
 
 rewind ()
 Rewind to the first found context. More...
 
 valid ()
 Check if the current position is valid. More...
 

Protected Member Functions

 set_component ($component)
 Sets the component for this contextlist. More...
 
 set_contextids (array $contextids)
 Set the contextids. More...
 
 set_user (\stdClass $user)
 Specify the user which owns this request. More...
 

Protected Attributes

string $component = ''
 component the frankenstyle component name.
 
int $iteratorposition = 0
 Current position of the iterator.
 
stdClass $user
 The user this contextlist belongs to.
 

Detailed Description

Privacy Fetch Result Set.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ add_context()

core_privacy\tests\request\approved_contextlist::add_context ( \context  $context)

Add a single context to this approved_contextlist.

Parameters
context$contextThe context to be added.
Return values
$this

◆ add_context_by_id()

core_privacy\tests\request\approved_contextlist::add_context_by_id (   $contextid)

Add a single context to this approved_contextlist by it's ID.

Parameters
int$contextidThe context to be added.
Return values
$this

◆ add_contexts()

core_privacy\tests\request\approved_contextlist::add_contexts ( array  $contexts)

Add a set of contexts to this approved_contextlist.

Parameters
context[]$contextsThe contexts to be added.
Return values
$this

◆ add_contexts_by_id()

core_privacy\tests\request\approved_contextlist::add_contexts_by_id ( array  $contexts)

Add a set of contexts to this approved_contextlist by ID.

Parameters
int[]$contextsThe contexts to be added.
Return values
$this

◆ current()

core_privacy\local\request\contextlist_base::current ( )
inherited

Return the current context.

Return values
context

◆ get_component()

core_privacy\local\request\contextlist_base::get_component ( )
inherited

Get the name of the component to which this contextlist belongs.

Return values
stringthe 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
int[]

◆ 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
context[]

◆ get_user()

core_privacy\local\request\approved_contextlist::get_user ( )
inherited

Get the user which requested their data.

Return values
stdClass

◆ key()

core_privacy\local\request\contextlist_base::key ( )
inherited

Return the key of the current element.

Return values
mixed

◆ 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_base::set_component (   $component)
protectedinherited

Sets the component for this contextlist.

Parameters
string$componentthe frankenstyle component name.

Reimplemented in core_privacy\local\request\contextlist.

◆ set_contextids()

core_privacy\local\request\contextlist_base::set_contextids ( array  $contextids)
protectedinherited

Set the contextids.

Parameters
array$contextidsThe list of contexts.

◆ set_user()

core_privacy\local\request\approved_contextlist::set_user ( \stdClass  $user)
protectedinherited

Specify the user which owns this request.

Parameters
stdClass$userThe user record.
Return values
$this

◆ valid()

core_privacy\local\request\contextlist_base::valid ( )
inherited

Check if the current position is valid.

Return values
bool

The documentation for this class was generated from the following file: