LTI Integration Library 5.3.0
PHP class library for building LTI integrations
Loading...
Searching...
No Matches

Class to represent an LTI link content item. More...

Inheritance diagram for LtiLinkContentItem:

Public Member Functions

 __construct (?string $id=null)
 Class constructor.
object toJsonObject ()
 Wrap the content items to form a complete value for the https://purl.imsglobal.org/spec/lti-dl/claim/content_items claim.
Public Member Functions inherited from ContentItem
Item getItem ()
 Get content item.
bool delete (Platform $platform)
 Delete a content-item.
string toJson ()
 Wrap the content item to form a JSON string.

Public Attributes

string $resourceLinkId = null
 Resourcelink ID value.
array $lineItemIds = null
 IDs for associated line-items.
Public Attributes inherited from ContentItem
array $readonly = null
 Readonly properties.

Protected Member Functions

bool fromJsonObject (object $obj)
 Extract content item details from its JSON representation.

Additional Inherited Members

Static Public Member Functions inherited from ContentItem
static ContentItem LtiLinkContentItem null fromType (string $type, ?string $id=null)
 Generate a Content Item object from its type.
static ContentItem LtiLinkContentItem null fromJsonItem (object $item)
 Generate a Content Item object from its JSON representation.
static ContentItem bool fromEndpoint (Platform $platform, string $endpoint)
 Retrieve a content item definition.
Protected Attributes inherited from ContentItem
Item $item
 Item object.

Detailed Description

Class to represent an LTI link content item.

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

Constructor & Destructor Documentation

◆ __construct()

__construct ( ?string $id = null)

Class constructor.

Parameters
string | null$idEndpoint of content item

Member Function Documentation

◆ fromJsonObject()

bool fromJsonObject ( object $obj)
protected

Extract content item details from its JSON representation.

Parameters
object$objA JSON object representing an LTI link content item
Returns
bool True if the item is valid

Reimplemented from ContentItem.

◆ toJsonObject()

object toJsonObject ( )

Wrap the content items to form a complete value for the https://purl.imsglobal.org/spec/lti-dl/claim/content_items claim.

Returns
object JSON object

Reimplemented from ContentItem.