LTI Integration Library  3.1.0
PHP class library for building LTI integrations
ApiResourceLink Class Reference

Class to implement resource link services for a tool consumer via its proprietary API. More...

Inheritance diagram for ApiResourceLink:
CanvasApiResourceLink MoodleApiResourceLink

Public Member Functions

 __construct ($resourceLink)
 Class constructor. More...
 
 doOutcomesService ($action, $ltiOutcome, $userresult)
 Perform an Outcomes service request. More...
 
 getMemberships ($withGroups)
 Get memberships. More...
 
 getToolSettings ($mode=Service\ToolSettings::MODE_CURRENT_LEVEL, $simple=true)
 Get Tool Settings. More...
 
 setToolSettings ($settings=array())
 Perform a Tool Settings service request. More...
 

Protected Attributes

 $resourceLink = null
 Resource link object. More...
 

Detailed Description

Class to implement resource link services for a tool consumer via its proprietary API.

Author
Stephen P Vickers steph.nosp@m.en@s.nosp@m.pvsof.nosp@m.twar.nosp@m.eprod.nosp@m.ucts.nosp@m..com
Version
3.1.0
Licence: http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3

Definition at line 13 of file ApiResourceLink.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $resourceLink)

Class constructor.

Parameters
\ceLTIc\LTI\ResourceLink$resourceLink

Definition at line 28 of file ApiResourceLink.php.

References ApiResourceLink\$resourceLink.

Member Function Documentation

◆ doOutcomesService()

doOutcomesService (   $action,
  $ltiOutcome,
  $userresult 
)

Perform an Outcomes service request.

Parameters
int$actionThe action type constant
Outcome$ltiOutcomeOutcome object
UserResult$userresultUserResult object
Returns
string|bool Outcome value read or true if the request was successfully processed

Definition at line 42 of file ApiResourceLink.php.

◆ getMemberships()

getMemberships (   $withGroups)

Get memberships.

Parameters
bool$withGroupsTrue is group information is to be requested as well
Returns
mixed Array of UserResult objects or False if the request was not successful

Definition at line 54 of file ApiResourceLink.php.

◆ getToolSettings()

getToolSettings (   $mode = Service\ToolSettings::MODE_CURRENT_LEVEL,
  $simple = true 
)

Get Tool Settings.

Parameters
int$modeMode for request (optional, default is current level only)
bool$simpleTrue if all the simple media type is to be used (optional, default is true)
Returns
mixed The array of settings if successful, otherwise false

Definition at line 67 of file ApiResourceLink.php.

◆ setToolSettings()

setToolSettings (   $settings = array())

Perform a Tool Settings service request.

Parameters
array$settingsAn associative array of settings (optional, default is none)
Returns
bool True if action was successful, otherwise false

Definition at line 79 of file ApiResourceLink.php.

Field Documentation

◆ $resourceLink

ceLTIc LTI ResourceLink null $resourceLink = null
protected

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