class DeepLinkResponse extends DeepLinkResponse

This is a general purpose DeepLink class with no Tsugi-specific dependencies.

Deep Linking 2.0 spec: https://www.imsglobal.org/spec/lti-dl/v2p0

Constants

DATA_CLAIM

CONTENT_ITEMS

MESSAGE_MSG

MESSAGE_LOG

MESSAGE_ERRORMSG

MESSAGE_ERRORLOG

Properties

$claim from DeepLinkRequest
$json from DeepLinkResponse
$items from DeepLinkResponse

Methods

__construct($request)

No description

string
returnUrl()

returnUrl - Returns the deep_link_return_url

allowMimetype($Mimetype)

allowMimetype - Returns true if we can return LTI Link Items

allowMultiple()

allowMultiple - Returns true if we can return multiple items

acceptType($type)

acceptType - Returns true if the string is in the accept_types

allowLtiLinkItem()

allowLtiLinkItem - Returns true if we can return LTI Link Items "accept_types": ["link", "file", "html", "ltiResourceLink", "image"],

allowContentItem()

allowContentItem - Returns true if we can return HTML Items

allowLink()

allowLink - Returns true if we can return HTML Items

allowImportItem()

allowImportItem - Returns true if we can return IMS Common Cartridges

getClaim(str $string, default $default = null)

getClaim - get a extension claim

getContentItemSelection()

Return the claims array to send back to the LMS

addLtiLinkItem($url, $title = false, $text = false, $icon = false, $fa_icon = false, $custom = false, $scoreMaximum = false, $resourceId = false, $additionalParams = array())

addLtiLinkItem - Add an LTI Link Deep Link

addLtiLinkItemExtended($params = array())

addLtiLinkItemExtended - Add an LTI Link Content Item

addContentItem($url, $title = false, $text = false, $icon = false, $fa_icon = false, $additionalParams = array())

addContentItem - Add an Content Item

addContentItemExtended($params = array())

addContentItemExtended - Add an Content Item

addFileItem($url, $title = false, $additionalParams = array())

addFileItem - Add an File Item

prepareResponse($endform = false, $debug = false, $iframeattr = false)

Make up a response

Details

at line 16
__construct($request)

Parameters

$request

in DeepLinkRequest at line 39
string returnUrl()

returnUrl - Returns the deep_link_return_url

Return Value

string The deep_link_return_url or false

in DeepLinkRequest at line 47
allowMimetype($Mimetype)

allowMimetype - Returns true if we can return LTI Link Items

Parameters

$Mimetype

in DeepLinkRequest at line 63
allowMultiple()

allowMultiple - Returns true if we can return multiple items

in DeepLinkRequest at line 77
acceptType($type)

acceptType - Returns true if the string is in the accept_types

"accept_types": ["link", "file", "html", "ltiResourceLink", "image"],

Parameters

$type

in DeepLinkRequest at line 87
allowLtiLinkItem()

allowLtiLinkItem - Returns true if we can return LTI Link Items "accept_types": ["link", "file", "html", "ltiResourceLink", "image"],

in DeepLinkRequest at line 95
allowContentItem()

allowContentItem - Returns true if we can return HTML Items

allowLink - Returns true if we can return HTML Items

in DeepLinkRequest at line 112
allowImportItem()

allowImportItem - Returns true if we can return IMS Common Cartridges

in DeepLinkRequest at line 131
getClaim(str $string, default $default = null)

getClaim - get a extension claim

Parameters

str $string The claim to retrieve
default $default The default value

in DeepLinkResponse at line 47
getContentItemSelection()

Return the claims array to send back to the LMS

in DeepLinkResponse at line 71
addLtiLinkItem($url, $title = false, $text = false, $icon = false, $fa_icon = false, $custom = false, $scoreMaximum = false, $resourceId = false, $additionalParams = array())

addLtiLinkItem - Add an LTI Link Deep Link

Parameters

$url
$title
$text
$icon
$fa_icon
$custom
$scoreMaximum
$resourceId
$additionalParams

in DeepLinkResponse at line 100
addLtiLinkItemExtended($params = array())

addLtiLinkItemExtended - Add an LTI Link Content Item

Parameters

$params Key/Value pair of configurable options for content item (see addLtiLinkItem)

in DeepLinkResponse at line 215
addContentItem($url, $title = false, $text = false, $icon = false, $fa_icon = false, $additionalParams = array())

addContentItem - Add an Content Item

Parameters

$url
$title
$text
$icon
$fa_icon
$additionalParams

in DeepLinkResponse at line 243
addContentItemExtended($params = array())

addContentItemExtended - Add an Content Item

Parameters

$params Key/Value pair of configurable options for content item (see addContentItem)

in DeepLinkResponse at line 307
addFileItem($url, $title = false, $additionalParams = array())

addFileItem - Add an File Item

Parameters

$url
$title
$additionalParams

at line 29
prepareResponse($endform = false, $debug = false, $iframeattr = false)

Make up a response

Parameters

$endform Some HTML to be included before the form closing tag $endform = 'Back to Store';
$debug boolean true to pause process to debug.
$iframeattr A string of attributes to put on the iframe tag