88 reset($this->
custom[$name]);
136 $item = parent::toJsonldObject();
137 if (!empty($this->lineItem)) {
138 $item->lineItem = $this->lineItem->toJsonldObject();
140 if (!is_null($this->noUpdate)) {
150 if (!empty($this->
custom)) {
164 $item = parent::toJsonObject();
165 if (!empty($this->lineItem)) {
166 $item->lineItem = $this->lineItem->toJsonObject();
168 if (!is_null($this->noUpdate)) {
178 if (!empty($this->
custom)) {
191 parent::fromJsonObject($item);
192 foreach (get_object_vars($item) as
$name => $value) {
195 foreach ($item->custom as $paramName => $paramValue) {
196 $this->
addCustom($paramName, $paramValue);
209 $this->noUpdate = $item->noUpdate;
toJsonldObject()
Wrap the content item to form an item complying with the application/vnd.ims.lti.v1.contentitems+json media type.
array $custom
Custom parameters for content-item.
setAvailable($available)
Set an availability time period for the content-item.
addCustom(string $name, ?string $value=null)
Add a custom parameter for the content-item.
Class to represent a line-item object.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
toJsonObject()
Wrap the content items to form a complete value for the https://purl.imsglobal.org/spec/lti-dl/claim/...
setLineItem(LineItem $lineItem)
Set a line-item for the content-item.
static fromJsonObject(object $item)
Generate a LineItem object from its JSON or JSON-LD representation.
string $available
Time period for availability.
Class to represent an LTI link content-item object.
setNoUpdate(?bool $noUpdate)
Set whether the content-item should not be allowed to be updated.
const TYPE_LTI_LINK
Type for LTI link content-item.
string $id
ID of content-item.
Class to represent a content-item object.
static fromJsonObject(object $item)
Generate a LineItem object from its JSON or JSON-LD representation.
__construct(Container $dic, ilPlugin $plugin)
const LTI_LINK_MEDIA_TYPE
Media type for LTI launch links.
string $submission
Time period for submission.
setMediaType(string $mediaType)
Set a media type value for the content-item.
__construct($placementAdvices=null, $id=null)
Class constructor.
setSubmission($submission)
Set a submission time period for the content-item.
fromJsonObject(object $item)
Extract content-item details from its JSON representation.
LineItem $lineItem
Line-item object for content-item.
bool $noUpdate
Do not allow the item to be updated?