|
| __construct ($type, $placementAdvice=null, $id=null) |
| Class constructor.
|
|
| setMediaType ($mediaType) |
| Set a media type value for the content-item.
|
|
| setText ($text) |
| Set a link text value for the content-item.
|
|
| setTitle ($title) |
| Set a title value for the content-item.
|
|
| setUrl ($url) |
| Set a URL value for the content-item.
|
|
|
static | toJson ($items) |
| Wrap the content items to form a complete application/vnd.ims.lti.v1.contentitems+json media type instance.
|
|
|
const | LTI_LINK_MEDIA_TYPE = 'application/vnd.ims.lti.v1.ltilink' |
| Media type for LTI launch links.
|
|
◆ __construct()
IMSGlobal\LTI\ToolProvider\ContentItem::__construct |
( |
| $type, |
|
|
| $placementAdvice = null, |
|
|
| $id = null ) |
Class constructor.
- Parameters
-
string | $type | Class type of content-item |
ContentItemPlacement | $placementAdvice | Placement object for item (optional) |
string | $id | URL of content-item (optional) |
◆ setMediaType()
IMSGlobal\LTI\ToolProvider\ContentItem::setMediaType |
( |
| $mediaType | ) |
|
Set a media type value for the content-item.
- Parameters
-
string | $mediaType | Media type value |
◆ setText()
IMSGlobal\LTI\ToolProvider\ContentItem::setText |
( |
| $text | ) |
|
Set a link text value for the content-item.
- Parameters
-
string | $text | Link text value |
◆ setTitle()
IMSGlobal\LTI\ToolProvider\ContentItem::setTitle |
( |
| $title | ) |
|
Set a title value for the content-item.
- Parameters
-
◆ setUrl()
IMSGlobal\LTI\ToolProvider\ContentItem::setUrl |
( |
| $url | ) |
|
Set a URL value for the content-item.
- Parameters
-
◆ toJson()
static IMSGlobal\LTI\ToolProvider\ContentItem::toJson |
( |
| $items | ) |
|
|
static |
Wrap the content items to form a complete application/vnd.ims.lti.v1.contentitems+json media type instance.
- Parameters
-
mixed | $items | An array of content items or a single item |
- Return values
-
The documentation for this class was generated from the following file:
- lib/ltiprovider/src/ToolProvider/ContentItem.php