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

Public Member Functions

 __construct (deployment_repository $deploymentrepo, application_registration_repository $registrationrepo, resource_link_repository $resourcelinkrepo, user_repository $userrepo, context_repository $contextrepo)
 The tool_launch_service constructor.
 
 user_launches_tool (\stdClass $user, LtiMessageLaunch $launch)
 Handles the use case "A user launches the tool so they can view an external resource".
 

Constructor & Destructor Documentation

◆ __construct()

enrol_lti\local\ltiadvantage\service\tool_launch_service::__construct ( deployment_repository $deploymentrepo,
application_registration_repository $registrationrepo,
resource_link_repository $resourcelinkrepo,
user_repository $userrepo,
context_repository $contextrepo )

The tool_launch_service constructor.

Parameters
deployment_repository$deploymentrepoinstance of a deployment_repository.
application_registration_repository$registrationrepoinstance of an application_registration_repository.
resource_link_repository$resourcelinkrepoinstance of a resource_link_repository.
user_repository$userrepoinstance of a user_repository.
context_repository$contextrepoinstance of a context_repository.

Member Function Documentation

◆ user_launches_tool()

enrol_lti\local\ltiadvantage\service\tool_launch_service::user_launches_tool ( \stdClass $user,
LtiMessageLaunch $launch )

Handles the use case "A user launches the tool so they can view an external resource".

Parameters
stdClass$userthe Moodle user record, obtained via the auth_lti authentication process.
LtiMessageLaunch$launchthe launch data.
Return values
arrayarray containing [int $userid, stdClass $resource]
Exceptions
moodle_exceptionif launch problems are encountered.

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