Skip to content

Instantly share code, notes, and snippets.

@tmaslen
Last active January 2, 2016 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmaslen/8336434 to your computer and use it in GitHub Desktop.
Save tmaslen/8336434 to your computer and use it in GitHub Desktop.
<?php
class BBC_Indepthtoolkit_Model_Clickableguide
{
public $mainImage = null;
public $hotspots = array();
public $hotspotType = ""; // possible values: thumbnail|shape|label
public $panels = array();
public $layoutType = ""; // possible values: storybody-halfwide-include|SOMETHING ELSE - STEVE TO CONFIRM
public $panelType = ""; // possible values: dyn_full|dyn_half_wide|dyn_full_narrow|dyn_half_narrow|dyn_narrow
public $modalMode = "";
public $panelNav = false;
public $panelPosition = "default";
public $zoomableImages = false;
public function __construct()
{
}
public function setHotspotType()
{
}
public function setPanelPosition()
{
}
public function setWidth()
{
}
}
class BBC_Indepthtoolkit_Model_ClickableguidePanel
{
public $id = null;
public $header = "";
public $subHeader = "";
public $image = null;
public $emp = null;
public $text = "";
public $carouselItems = array();
}
class BBC_Indepthtoolkit_Model_ClickableguideHotspot
{
public $icon = ""; // possible values img|video|audio|text|no_icon
public $coords = array(
"top" => 0,
"left" => 0
);
public $panelId = null;
public $width = "";
public $height = 0;
}
class BBC_Indepthtoolkit_Model_ClickableguideHotspotCircle
{
public $icon = "";
public $coords = array(
"x" => 0,
"y" => 0
);
public $panelId = null;
public $radius = 0;
}
class BBC_Indepthtoolkit_Model_ClickableguideImage
{
public $src = null;
public $width = null;
public $height = null;
public $alt = null;
public $caption = null;
}
class BBC_Indepthtoolkit_Model_ClickableguideCarouselItem
{
public $image = null;
public $caption = null;
}
// usage
$clickableGuide = new BBC_Indepthtoolkit_Clickableguide();
$clickableGuide->mainImage->src;
foreach ($clickableGuide->hotspots as $hotspot) {
$hotspot->icon
// static hotspot
$hotspot->coords["top"];
$hotspot->coords["left"];
$hotspot->height;
$hotspot->width;
// circle hotspot
$hotspot->coords["x"];
$hotspot->coords["y"];
$hotspot->radius
}
foreach ($clickableGuide->panels as $panel) {
$panel->header;
$panel->image->src;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment