Last active
January 2, 2016 17:19
-
-
Save tmaslen/8336434 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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