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

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

Inheritance diagram for Placement:
ContentItemPlacement

Public Member Functions

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

Static Public Member Functions

static Placement fromJsonObject ($item, $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 null $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 (   $documentTarget,
  $displayWidth = null,
  $displayHeight = null,
  $windowTarget = null,
  $windowFeatures = null,
  $url = null,
  $html = null 
)

Class constructor.

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

Member Function Documentation

◆ fromJsonObject()

static Placement fromJsonObject (   $item,
  $documentTarget = null 
)
static

Generate the Placement object from an item.

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

◆ toJsonldObject()

object toJsonldObject ( )

Generate the JSON-LD object representation of the placement.

Returns
object

◆ toJsonObject()

object toJsonObject ( )

Generate the JSON object representation of the placement.

Returns
object

Member Data Documentation

◆ $documentTarget

string null $documentTarget = null

Location to open content in.

$documentTarget

Referenced by ContentItemPlacement\__construct().


The documentation for this class was generated from the following file: