Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
enrol_lti\local\ltiadvantage\repository\context_repository Class Reference

Public Member Functions

 delete (int $id)
 Delete the context identified by 'id' from the store.
 
 delete_by_deployment (int $deploymentid)
 Delete all contexts under a given deployment.
 
 exists (int $id)
 Check whether the context identified by 'id' exists in the store.
 
 find (int $id)
 Find a context by id.
 
 find_by_contextid (string $contextid, int $deploymentid)
 Find a context by it's platform-issued context id string.
 
 save (context $context)
 Save the context to the store.
 

Member Function Documentation

◆ delete()

enrol_lti\local\ltiadvantage\repository\context_repository::delete ( int $id)

Delete the context identified by 'id' from the store.

Parameters
int$idthe id of context to delete.

◆ delete_by_deployment()

enrol_lti\local\ltiadvantage\repository\context_repository::delete_by_deployment ( int $deploymentid)

Delete all contexts under a given deployment.

Parameters
int$deploymentidthe id of the local deployment instance.

◆ exists()

enrol_lti\local\ltiadvantage\repository\context_repository::exists ( int $id)

Check whether the context identified by 'id' exists in the store.

Parameters
int$idthe id of the instance to check.
Return values
booltrue if found, false otherwise.

◆ find()

enrol_lti\local\ltiadvantage\repository\context_repository::find ( int $id)

Find a context by id.

Parameters
int$idthe id of the instance.
Return values
context|nullthe context, if found, else null.

◆ find_by_contextid()

enrol_lti\local\ltiadvantage\repository\context_repository::find_by_contextid ( string $contextid,
int $deploymentid )

Find a context by it's platform-issued context id string.

Parameters
string$contextidthe id of the context on the platform.
int$deploymentidthe id of the local deployment instance in which the contextid is unique.
Return values
context|nullthe context instance, if found, else null.

◆ save()

enrol_lti\local\ltiadvantage\repository\context_repository::save ( context $context)

Save the context to the store.

Parameters
context$contextthe context to save.
Return values
contextthe saved context instance.

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