ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Class to represent a content-item object. More...
Public Member Functions | |
__construct ($type, $placementAdvice=null, $id=null) | |
Class constructor. More... | |
setUrl ($url) | |
Set a URL value for the content-item. More... | |
setMediaType ($mediaType) | |
Set a media type value for the content-item. More... | |
setTitle ($title) | |
Set a title value for the content-item. More... | |
setText ($text) | |
Set a link text value for the content-item. More... | |
Static Public Member Functions | |
static | toJson ($items) |
Wrap the content items to form a complete application/vnd.ims.lti.v1.contentitems+json media type instance. More... | |
Data Fields | |
const | LTI_LINK_MEDIA_TYPE = 'application/vnd.ims.lti.v1.ltilink' |
Media type for LTI launch links. More... | |
Class to represent a content-item object.
Definition at line 14 of file ContentItem.php.
IMSGlobal\LTI\ToolProvider\ContentItem::__construct | ( | $type, | |
$placementAdvice = null , |
|||
$id = null |
|||
) |
Class constructor.
string | $type | Class type of content-item |
ContentItemPlacement | $placementAdvice | Placement object for item (optional) |
string | $id | URL of content-item (optional) |
Definition at line 29 of file ContentItem.php.
IMSGlobal\LTI\ToolProvider\ContentItem::setMediaType | ( | $mediaType | ) |
Set a media type value for the content-item.
string | $mediaType | Media type value |
Definition at line 63 of file ContentItem.php.
IMSGlobal\LTI\ToolProvider\ContentItem::setText | ( | $text | ) |
Set a link text value for the content-item.
string | $text | Link text value |
Definition at line 95 of file ContentItem.php.
References $text.
IMSGlobal\LTI\ToolProvider\ContentItem::setTitle | ( | $title | ) |
Set a title value for the content-item.
string | $title | Title value |
Definition at line 79 of file ContentItem.php.
References $title.
IMSGlobal\LTI\ToolProvider\ContentItem::setUrl | ( | $url | ) |
Set a URL value for the content-item.
string | $url | URL value |
Definition at line 47 of file ContentItem.php.
References $url.
|
static |
Wrap the content items to form a complete application/vnd.ims.lti.v1.contentitems+json media type instance.
mixed | $items | An array of content items or a single item |
Definition at line 112 of file ContentItem.php.
References array.
const IMSGlobal\LTI\ToolProvider\ContentItem::LTI_LINK_MEDIA_TYPE = 'application/vnd.ims.lti.v1.ltilink' |
Media type for LTI launch links.
Definition at line 20 of file ContentItem.php.