Class to represent a content-item placement object. More...
Public Member Functions | |
| __construct ($documentTarget, $displayWidth=null, $displayHeight=null, $windowTarget=null, $windowFeatures=null, $url=null, $html=null) | |
| Class constructor. | |
| toJsonldObject () | |
| Generate the JSON-LD object representation of the placement. | |
| toJsonObject () | |
| Generate the JSON object representation of the placement. | |
Static Public Member Functions | |
| static | fromJsonObject ($item, $documentTarget=null) |
| Generate the Placement object from an item. | |
Data Fields | |
| 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. | |
| $documentTarget = null | |
| Location to open content in. | |
Class to represent a content-item placement object.
Definition at line 12 of file Placement.php.
| __construct | ( | $documentTarget, | |
$displayWidth = null, |
|||
$displayHeight = null, |
|||
$windowTarget = null, |
|||
$windowFeatures = null, |
|||
$url = null, |
|||
$html = null |
|||
| ) |
Class constructor.
| string | $documentTarget | Location to open content in |
| int | null | $displayWidth | Width of item location (optional) |
| int | null | $displayHeight | Height of item location (optional) |
| string | null | $windowTarget | Name of window target (optional) |
| string | null | $windowFeatures | List of window features (optional) |
| string | null | $url | URL for iframe src (optional) |
| string | null | $html | HTML to be embedded (optional) |
Definition at line 105 of file Placement.php.
References Placement\$documentTarget.
|
static |
Generate the Placement object from an item.
| object | $item | JSON object of item |
| string | null | $documentTarget | Destination of placement to be generated (optional) |
Definition at line 199 of file Placement.php.
| toJsonldObject | ( | ) |
Generate the JSON-LD object representation of the placement.
Definition at line 122 of file Placement.php.
References Placement\$documentTarget.
| toJsonObject | ( | ) |
Generate the JSON object representation of the placement.
Definition at line 148 of file Placement.php.
References Placement\TYPE_EMBED, Placement\TYPE_IFRAME, and Placement\TYPE_WINDOW.
| string null $documentTarget = null |
Location to open content in.
Definition at line 50 of file Placement.php.
Referenced by ContentItemPlacement\__construct(), Placement\__construct(), and Placement\toJsonldObject().
| const TYPE_EMBED = 'embed' |
Embed placement type.
Definition at line 18 of file Placement.php.
Referenced by Placement\toJsonObject().
| const TYPE_FRAME = 'frame' |
Frame placement type.
Definition at line 28 of file Placement.php.
| const TYPE_IFRAME = 'iframe' |
iFrame placement type.
Definition at line 23 of file Placement.php.
Referenced by Placement\toJsonObject().
| const TYPE_OVERLAY = 'overlay' |
Overlay placement type.
Definition at line 43 of file Placement.php.
| const TYPE_POPUP = 'popup' |
Popup placement type.
Definition at line 38 of file Placement.php.
| const TYPE_WINDOW = 'window' |
Window placement type.
Definition at line 33 of file Placement.php.
Referenced by Placement\toJsonObject().