Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
enrol_lti\local\ltiadvantage\entity\deployment Class Reference

Public Member Functions

 add_context (string $contextid, array $types)
 Factory method to add a platform-specific context to the deployment.
 
 add_resource_link (string $resourcelinkid, int $resourceid, int $contextid=null)
 Factory method to create a resource link from this deployment instance.
 
 get_deploymentid ()
 Get the deployment id string.
 
 get_deploymentname ()
 Return the short name of this tool deployment.
 
 get_id ()
 Return the object id.
 
 get_legacy_consumer_key ()
 Get the legacy consumer key to which this deployment instance is mapped.
 
 get_registrationid ()
 Get the id of the application_registration.
 
 set_legacy_consumer_key (string $key)
 Set the legacy consumer key for this instance, indicating that the deployment has been migrated from a consumer.
 

Static Public Member Functions

static create (int $registrationid, string $deploymentid, string $deploymentname, ?int $id=null, ?string $legacyconsumerkey=null)
 Factory method to create a new instance of a deployment.
 

Member Function Documentation

◆ add_context()

enrol_lti\local\ltiadvantage\entity\deployment::add_context ( string $contextid,
array $types )

Factory method to add a platform-specific context to the deployment.

Parameters
string$contextidthe contextid, as supplied by the platform during launch.
array$typesthe context types the context represents, as supplied by the platform during launch.
Return values
contextthe context instance.
Exceptions
coding_exceptionif the context could not be created.

◆ add_resource_link()

enrol_lti\local\ltiadvantage\entity\deployment::add_resource_link ( string $resourcelinkid,
int $resourceid,
int $contextid = null )

Factory method to create a resource link from this deployment instance.

Parameters
string$resourcelinkidthe platform-issued string id of the resource link.
int$resourceidthe local published resource to which this link points.
int | null$contextidthe platform context instance in which the resource link resides, if available.
Return values
resource_linkthe resource_link instance.
Exceptions
coding_exceptionif the resource_link can't be created.

◆ create()

static enrol_lti\local\ltiadvantage\entity\deployment::create ( int $registrationid,
string $deploymentid,
string $deploymentname,
?int $id = null,
?string $legacyconsumerkey = null )
static

Factory method to create a new instance of a deployment.

Parameters
int$registrationidthe local ID of the application registration.
string$deploymentidthe platform-issued deployment id.
string$deploymentnamethe name of this deployment.
int | null$idoptional local id of this object instance, omitted for new deployment objects.
string | null$legacyconsumerkeythe 1.1 consumer key associated with this deployment, used for upgrades.
Return values
deploymentthe deployment instance.

◆ get_deploymentid()

enrol_lti\local\ltiadvantage\entity\deployment::get_deploymentid ( )

Get the deployment id string.

Return values
stringdeploymentid

◆ get_deploymentname()

enrol_lti\local\ltiadvantage\entity\deployment::get_deploymentname ( )

Return the short name of this tool deployment.

Return values
stringthe short name.

◆ get_id()

enrol_lti\local\ltiadvantage\entity\deployment::get_id ( )

Return the object id.

Return values
int|nullthe id.

◆ get_legacy_consumer_key()

enrol_lti\local\ltiadvantage\entity\deployment::get_legacy_consumer_key ( )

Get the legacy consumer key to which this deployment instance is mapped.

Return values
string|nullthe legacy consumer key, if set, else null.

◆ get_registrationid()

enrol_lti\local\ltiadvantage\entity\deployment::get_registrationid ( )

Get the id of the application_registration.

Return values
intthe id of the application_registration instance to which this deployment belongs.

◆ set_legacy_consumer_key()

enrol_lti\local\ltiadvantage\entity\deployment::set_legacy_consumer_key ( string $key)

Set the legacy consumer key for this instance, indicating that the deployment has been migrated from a consumer.

Parameters
string$keythe legacy consumer key.
Exceptions
coding_exceptionif the key is invalid.

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