LTI Integration Library 5.1.4
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
Placement Class Reference

Class to represent a content-item placement object. More...

Public Member Functions

 __construct (string $documentTarget, ?int $displayWidth=null, ?int $displayHeight=null, ?string $windowTarget=null, ?string $windowFeatures=null, ?string $url=null, ?string $html=null)
 Class constructor.
 
object null toJsonldObject ()
 Generate the JSON-LD object representation of the placement.
 
object null toJsonObject ()
 Generate the JSON object representation of the placement.
 

Static Public Member Functions

static Placement null fromJsonObject (object $item, ?string $documentTarget=null)
 Generate the Placement object from an item.
 

Public Attributes

const TYPE_EMBED = 'embed'
 Embed placement type.
 
const TYPE_IFRAME = 'iframe'
 iFrame placement type.
 
const TYPE_FRAME = 'frame'
 Frame placement type.
 
const TYPE_WINDOW = 'window'
 Window placement type.
 
const TYPE_POPUP = 'popup'
 Popup placement type.
 
const TYPE_OVERLAY = 'overlay'
 Overlay placement type.
 
string $documentTarget = null
 Location to open content in.
 

Detailed Description

Class to represent a content-item placement object.

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 $documentTarget,
?int $displayWidth = null,
?int $displayHeight = null,
?string $windowTarget = null,
?string $windowFeatures = null,
?string $url = null,
?string $html = null )

Class constructor.

Parameters
string$documentTargetLocation to open content in
int | null$displayWidthWidth of item location (optional)
int | null$displayHeightHeight of item location (optional)
string | null$windowTargetName of window target (optional)
string | null$windowFeaturesList of window features (optional)
string | null$urlURL for iframe src (optional)
string | null$htmlHTML to be embedded (optional)

Member Function Documentation

◆ fromJsonObject()

static Placement null fromJsonObject ( object $item,
?string $documentTarget = null )
static

Generate the Placement object from an item.

Parameters
object$itemJSON object of item
string | null$documentTargetDestination of placement to be generated (optional)
Returns
Placement|null The Placement object

◆ toJsonldObject()

object null toJsonldObject ( )

Generate the JSON-LD object representation of the placement.

Returns
object|null JSON object

◆ toJsonObject()

object null toJsonObject ( )

Generate the JSON object representation of the placement.

Returns
object|null JSON object