ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPCInteractiveImage Class Reference

Interactive image. More...

+ Inheritance diagram for ilPCInteractiveImage:
+ Collaboration diagram for ilPCInteractiveImage:

Public Member Functions

 init ()
 Init page content component.
 readMediaObject ($a_mob_id=0)
 Read/get Media Object.
 setNode ($a_node)
 Set node (and media object node)
 setDom (&$a_dom)
 Set dom object.
 setMediaObject ($a_mediaobject)
 Set Media Object.
 getMediaObject ()
 Get Media Object.
 createMediaObject ()
 Create new media object.
 create ($a_pg_obj, $a_hier_id)
 Create pc media object.
 getStandardMediaItem ()
 Get standard media item.
 getStandardAliasItem ()
 Get standard alias item.
 getBaseThumbnailTarget ()
 Get base thumbnail target.
 createAlias (&$a_pg_obj, $a_hier_id, $a_pc_id="")
 Create an media alias in page.
 dumpXML ()
 Dump node xml.
 setStyleClass ($a_class)
 Set style class.
 getStyleClass ()
 Get style class.
 addContentPopup ()
 Add a tab.
 getPopups ()
 Get popup captions.
 savePopups ($a_popups)
 Save popups.
 deletePopup ($a_hier_id, $a_pc_id)
 Delete popup.
 addTriggerArea ($a_alias_item, $a_shape_type, $a_coords, $a_title, $a_link)
 Get caption.
 addTriggerMarker ()
 Add a new trigger marker.
 getTriggerNodes ($a_hier_id, $a_pc_id="")
 Get trigger nodes.
 getTriggers ()
 Get triggers.
 deleteTrigger ($a_alias_item, $a_nr)
 Delete Trigger.
 setTriggerOverlays ($a_ovs)
 Set trigger overlays.
 setTriggerOverlayPositions ($a_pos)
 Set trigger overlay position.
 setTriggerMarkerPositions ($a_pos)
 Set trigger marker position.
 setTriggerPopupPositions ($a_pos)
 Set trigger popup position.
 setTriggerPopupSize ($a_size)
 Set trigger popup size.
 setTriggerPopups ($a_pops)
 Set trigger popups.
 setTriggerTitles ($a_titles)
 Set trigger titles.
 setExtLinkTitle ($a_nr, $a_title)
 Set ExtLink Title.
- Public Member Functions inherited from ilPageContent
 __construct ($a_pg_obj)
 Constructor.
 setPage ($a_val)
 Set page.
 getPage ()
 Get page.
 getType ()
 Get type of page content.
 setNode (&$a_node)
 Set xml node of page content.
getNode ()
 Get xml node of page content.
 getJavascriptFiles ()
 Get Javascript files.
 getCssFiles ()
 Get css files.
 getOnloadCode ()
 Get on load code.
 setHierId ($a_hier_id)
 Set hierarchical ID in xml structure.
 getHierId ()
 Get hierarchical id.
 lookupHierId ()
 Get hierarchical id from dom.
 readHierId ()
 Read PC Id.
 setPcId ($a_pcid)
 Set PC Id.
 getPCId ()
 Get PC Id.
 readPCId ()
 Read PC Id.
 writePCId ($a_pc_id)
 Write pc id.
 isGreaterHierId ($a, $b)
 Check whether Hier ID $a is greater than Hier ID $b.
 setEnabled ($value)
 Set Enabled value for page content component.
 enable ()
 Enable page content.
 disable ()
 Disable page content.
 isEnabled ()
 Check whether page content is enabled.
 createPageContentNode ($a_set_this_node=true)
 Create page content node (always use this method first when adding a new element)
 modifyPageContentPostXsl ($a_output, $a_mode)
 Modify page content after xsl.

Data Fields

 $dom
 $iim_node
const AREA = "Area"
const MARKER = "Marker"
- Data Fields inherited from ilPageContent
 $hier_id
 $node
 $dom

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContent
static incEdId ($ed_id)
 Increases an hierarchical editing id at lowest level (last number)
static decEdId ($ed_id)
 Decreases an hierarchical editing id at lowest level (last number)
static haveSameContainer ($ed_id1, $ed_id2)
 Check, if two ids are in same container.
static sortHierIds ($a_array)
 Sort an array of Hier IDS in ascending order.
static getLangVars ()
 Get lang vars needed for editing.
static handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false)
 Handle copied content.
static afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
 After page has been updated (or created)
static beforePageDelete ($a_page)
 Before page is being deleted.
static afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
 After page history entry has been created.
- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type.

Detailed Description

Interactive image.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 15 of file class.ilPCInteractiveImage.php.

Member Function Documentation

ilPCInteractiveImage::addContentPopup ( )

Add a tab.

Definition at line 259 of file class.ilPCInteractiveImage.php.

References $lng, and getPopups().

{
global $lng;
$max = 0;
$popups = $this->getPopups();
foreach ($popups as $p)
{
$max = max($max, (int) $p["nr"]);
}
$new_item = $this->dom->create_element("ContentPopup");
$new_item->set_attribute("Title", $lng->txt("cont_new_popup"));
$new_item->set_attribute("Nr", $max + 1);
$new_item = $this->iim_node->append_child($new_item);
}

+ Here is the call graph for this function:

ilPCInteractiveImage::addTriggerArea (   $a_alias_item,
  $a_shape_type,
  $a_coords,
  $a_title,
  $a_link 
)

Get caption.

Save positions of tabs Save positions of tabs Add a new trigger

Definition at line 434 of file class.ilPCInteractiveImage.php.

References $t, ilDOMUtil\addElementToList(), getTriggers(), IL_EXT_LINK, and ilUtil\stripSlashes().

{
$max = 0;
$triggers = $this->getTriggers();
foreach ($triggers as $t)
{
$max = max($max, (int) $t["Nr"]);
}
$link = array(
"LinkType" => IL_EXT_LINK,
"Href" => ilUtil::stripSlashes("#"));
$a_alias_item->addMapArea(
$a_shape_type, $a_coords,
ilUtil::stripSlashes($a_title), $link, $max + 1);
$attributes = array("Type" => self::AREA,
"Title" => ilUtil::stripSlashes($a_title),
"Nr" => $max + 1,
"OverlayX" => "0", "OverlayY" => "0", "Overlay" => "", "PopupNr" => "",
"PopupX" => "0", "PopupY" => "0", "PopupWidth" => "150", "PopupHeight" => "200");
$ma_node = ilDOMUtil::addElementToList($this->dom, $this->iim_node,
"Trigger", array("ContentPopup"), "", $attributes);
}

+ Here is the call graph for this function:

ilPCInteractiveImage::addTriggerMarker ( )

Add a new trigger marker.

Definition at line 464 of file class.ilPCInteractiveImage.php.

References $lng, $t, ilDOMUtil\addElementToList(), and getTriggers().

{
global $lng;
$max = 0;
$triggers = $this->getTriggers();
foreach ($triggers as $t)
{
$max = max($max, (int) $t["Nr"]);
}
$attributes = array("Type" => self::MARKER,
"Title" => $lng->txt("cont_new_marker"),
"Nr" => $max + 1, "OverlayX" => "0", "OverlayY" => "0",
"MarkerX" => "0", "MarkerY" => "0", "PopupNr" => "",
"PopupX" => "0", "PopupY" => "0", "PopupWidth" => "150", "PopupHeight" => "200");
$ma_node = ilDOMUtil::addElementToList($this->dom, $this->iim_node,
"Trigger", array("ContentPopup"), "", $attributes);
}

+ Here is the call graph for this function:

ilPCInteractiveImage::create (   $a_pg_obj,
  $a_hier_id 
)

Create pc media object.

Definition at line 107 of file class.ilPCInteractiveImage.php.

References ilPageContent\createPageContentNode().

{
$this->node = $this->createPageContentNode();
}

+ Here is the call graph for this function:

ilPCInteractiveImage::createAlias ( $a_pg_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Create an media alias in page.

Parameters
object$a_pg_objpage object
string$a_hier_idhierarchical ID

Definition at line 148 of file class.ilPCInteractiveImage.php.

References getMediaObject(), and IL_INSERT_AFTER.

{
$this->node =& $this->dom->create_element("PageContent");
$a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
$this->iim_node =& $this->dom->create_element("InteractiveImage");
$this->iim_node =& $this->node->append_child($this->iim_node);
$this->mal_node =& $this->dom->create_element("MediaAlias");
$this->mal_node =& $this->iim_node->append_child($this->mal_node);
$this->mal_node->set_attribute("OriginId", "il__mob_".$this->getMediaObject()->getId());
// standard view
$item_node =& $this->dom->create_element("MediaAliasItem");
$item_node =& $this->iim_node->append_child($item_node);
$item_node->set_attribute("Purpose", "Standard");
$media_item =& $this->getMediaObject()->getMediaItem("Standard");
$layout_node =& $this->dom->create_element("Layout");
$layout_node =& $item_node->append_child($layout_node);
if ($media_item->getWidth() > 0)
{
//$layout_node->set_attribute("Width", $media_item->getWidth());
}
if ($media_item->getHeight() > 0)
{
//$layout_node->set_attribute("Height", $media_item->getHeight());
}
$layout_node->set_attribute("HorizontalAlign", "Left");
// caption
if ($media_item->getCaption() != "")
{
$cap_node =& $this->dom->create_element("Caption");
$cap_node =& $item_node->append_child($cap_node);
$cap_node->set_attribute("Align", "bottom");
$cap_node->set_content($media_item->getCaption());
}
// text representation
if ($media_item->getTextRepresentation() != "")
{
$tr_node =& $this->dom->create_element("TextRepresentation");
$tr_node =& $item_node->append_child($tr_node);
$tr_node->set_content($media_item->getTextRepresentation());
}
}

+ Here is the call graph for this function:

ilPCInteractiveImage::createMediaObject ( )

Create new media object.

Definition at line 99 of file class.ilPCInteractiveImage.php.

References setMediaObject().

{
}

+ Here is the call graph for this function:

ilPCInteractiveImage::deletePopup (   $a_hier_id,
  $a_pc_id 
)

Delete popup.

Definition at line 322 of file class.ilPCInteractiveImage.php.

{
// File Item
$childs = $this->iim_node->child_nodes();
$nodes = array();
for ($i=0; $i<count($childs); $i++)
{
if ($childs[$i]->node_name() == "ContentPopup")
{
if ($a_pc_id == $childs[$i]->get_attribute("PCID") &&
$a_hier_id == $childs[$i]->get_attribute("HierId"))
{
$childs[$i]->unlink($childs[$i]);
}
}
}
}
ilPCInteractiveImage::deleteTrigger (   $a_alias_item,
  $a_nr 
)

Delete Trigger.

Definition at line 545 of file class.ilPCInteractiveImage.php.

{
// File Item
$childs = $this->iim_node->child_nodes();
$nodes = array();
for ($i=0; $i<count($childs); $i++)
{
if ($childs[$i]->node_name() == "Trigger")
{
if ($a_nr == $childs[$i]->get_attribute("Nr"))
{
$childs[$i]->unlink($childs[$i]);
}
}
}
$a_alias_item->deleteMapAreaById($a_nr);
}
ilPCInteractiveImage::dumpXML ( )

Dump node xml.

Definition at line 197 of file class.ilPCInteractiveImage.php.

{
$xml = $this->dom->dump_node($this->node);
return $xml;
}
ilPCInteractiveImage::getBaseThumbnailTarget ( )

Get base thumbnail target.

Returns
string base thumbnail target

Definition at line 136 of file class.ilPCInteractiveImage.php.

References getMediaObject().

{
return $this->getMediaObject()->getMediaItem("Standard")->getThumbnailTarget();
}

+ Here is the call graph for this function:

ilPCInteractiveImage::getMediaObject ( )

Get Media Object.

Returns
object Media Object

Definition at line 91 of file class.ilPCInteractiveImage.php.

Referenced by createAlias(), getBaseThumbnailTarget(), and getStandardMediaItem().

{
return $this->mediaobject;
}

+ Here is the caller graph for this function:

ilPCInteractiveImage::getPopups ( )

Get popup captions.

Definition at line 279 of file class.ilPCInteractiveImage.php.

References ilPageContent\$hier_id.

Referenced by addContentPopup().

{
$titles = array();
$childs = $this->iim_node->child_nodes();
$k = 0;
for($i = 0; $i < count($childs); $i++)
{
if ($childs[$i]->node_name() == "ContentPopup")
{
$pc_id = $childs[$i]->get_attribute("PCID");
$hier_id = $childs[$i]->get_attribute("HierId");
$title = $childs[$i]->get_attribute("Title");
$nr = $childs[$i]->get_attribute("Nr");
$titles[] = array("title" => $title, "nr" => $nr,
"pc_id" => $pc_id, "hier_id" => $hier_id);
$k++;
}
}
return $titles;
}

+ Here is the caller graph for this function:

ilPCInteractiveImage::getStandardAliasItem ( )

Get standard alias item.

Definition at line 125 of file class.ilPCInteractiveImage.php.

{
return $this->std_alias_item;
}
ilPCInteractiveImage::getStandardMediaItem ( )

Get standard media item.

Returns

Definition at line 117 of file class.ilPCInteractiveImage.php.

References getMediaObject().

{
return $this->getMediaObject()->getMediaItem("Standard");
}

+ Here is the call graph for this function:

ilPCInteractiveImage::getStyleClass ( )

Get style class.

Returns
string style class

Definition at line 237 of file class.ilPCInteractiveImage.php.

{
if (is_object($this->iim_node))
{
$mal_node = $this->iim_node->first_child();
if (is_object($mal_node))
{
$class = $mal_node->get_attribute("Class");
return $class;
}
}
}
ilPCInteractiveImage::getTriggerNodes (   $a_hier_id,
  $a_pc_id = "" 
)

Get trigger nodes.

Definition at line 487 of file class.ilPCInteractiveImage.php.

References $path, $res, xpath_eval(), and xpath_new_context().

Referenced by getTriggers(), setTriggerMarkerPositions(), setTriggerOverlayPositions(), setTriggerOverlays(), setTriggerPopupPositions(), setTriggerPopups(), setTriggerPopupSize(), and setTriggerTitles().

{
if ($a_pc_id != "")
{
$xpc = xpath_new_context($this->dom);
$path = "//PageContent[@PCID = '".$a_pc_id."']/InteractiveImage/Trigger";
$res =& xpath_eval($xpc, $path);
if (count($res->nodeset) > 0)
{
return $res->nodeset;
}
return array();
}
$xpc = xpath_new_context($this->dom);
$path = "//PageContent[@HierId = '".$a_hier_id."']/InteractiveImage/Trigger";
$res =& xpath_eval($xpc, $path);
if (count($res->nodeset) > 0)
{
return $res->nodeset;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCInteractiveImage::getTriggers ( )

Get triggers.

Definition at line 514 of file class.ilPCInteractiveImage.php.

References getTriggerNodes().

Referenced by addTriggerArea(), and addTriggerMarker().

{
$tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPcId());
$trigger_arr = array();
for($i=0; $i < count($tr_nodes); $i++)
{
$tr_node = $tr_nodes[$i];
$childs = $tr_node->child_nodes();
$trigger_arr[] = array(
"Nr" => $tr_node->get_attribute("Nr"),
"Type" => $tr_node->get_attribute("Type"),
"Title" => $tr_node->get_attribute("Title"),
"OverlayX" => $tr_node->get_attribute("OverlayX"),
"OverlayY" => $tr_node->get_attribute("OverlayY"),
"MarkerX" => $tr_node->get_attribute("MarkerX"),
"MarkerY" => $tr_node->get_attribute("MarkerY"),
"Overlay" => $tr_node->get_attribute("Overlay"),
"PopupNr" => $tr_node->get_attribute("PopupNr"),
"PopupX" => $tr_node->get_attribute("PopupX"),
"PopupY" => $tr_node->get_attribute("PopupY"),
"PopupWidth" => $tr_node->get_attribute("PopupWidth"),
"PopupHeight" => $tr_node->get_attribute("PopupHeight")
);
}
return $trigger_arr;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCInteractiveImage::init ( )

Init page content component.

Reimplemented from ilPageContent.

Definition at line 26 of file class.ilPCInteractiveImage.php.

References ilPageContent\setType().

{
$this->setType("iim");
}

+ Here is the call graph for this function:

ilPCInteractiveImage::readMediaObject (   $a_mob_id = 0)

Read/get Media Object.

Parameters
intmedia object ID

Definition at line 36 of file class.ilPCInteractiveImage.php.

References setMediaObject().

{
if ($a_mob_id > 0)
{
$mob = new ilObjMediaObject($a_mob_id);
$this->setMediaObject($mob);
}
}

+ Here is the call graph for this function:

ilPCInteractiveImage::savePopups (   $a_popups)

Save popups.

Definition at line 304 of file class.ilPCInteractiveImage.php.

References ilPageContent\$hier_id.

{
$childs = $this->iim_node->child_nodes();
for($i = 0; $i < count($childs); $i++)
{
if ($childs[$i]->node_name() == "ContentPopup")
{
$pc_id = $childs[$i]->get_attribute("PCID");
$hier_id = $childs[$i]->get_attribute("HierId");
$k = $hier_id.":".$pc_id;
$childs[$i]->set_attribute("Title", $a_popups[$k]);
}
}
}
ilPCInteractiveImage::setDom ( $a_dom)

Set dom object.

Definition at line 71 of file class.ilPCInteractiveImage.php.

{
$this->dom =& $a_dom;
}
ilPCInteractiveImage::setExtLinkTitle (   $a_nr,
  $a_title 
)

Set ExtLink Title.

Parameters
@return

Definition at line 712 of file class.ilPCInteractiveImage.php.

References $path, $res, xpath_eval(), and xpath_new_context().

Referenced by setTriggerTitles().

{
if ($this->getPcId() != "")
{
$xpc = xpath_new_context($this->dom);
$path = "//PageContent[@PCID = '".$this->getPcId()."']/InteractiveImage/MediaAliasItem/MapArea[@Id='".$a_nr."']/ExtLink";
$res = xpath_eval($xpc, $path);
if (count($res->nodeset) > 0)
{
$res->nodeset[0]->set_content($a_title);
}
return;
}
$xpc = xpath_new_context($this->dom);
$path = "//PageContent[@HierId = '".$this->hier_id."']/InteractiveImage/MediaAliasItem/MapArea[@Id='".$a_nr."']/ExtLink";
$res =& xpath_eval($xpc, $path);
if (count($res->nodeset) > 0)
{
$res->nodeset[0]->set_content($a_title);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCInteractiveImage::setMediaObject (   $a_mediaobject)

Set Media Object.

Parameters
object$a_mediaobjectMedia Object

Definition at line 81 of file class.ilPCInteractiveImage.php.

Referenced by createMediaObject(), readMediaObject(), and setNode().

{
$this->mediaobject = $a_mediaobject;
}

+ Here is the caller graph for this function:

ilPCInteractiveImage::setNode (   $a_node)

Set node (and media object node)

Definition at line 48 of file class.ilPCInteractiveImage.php.

References ilInternalLink\_extractObjIdOfTarget(), ilObject\_lookupType(), ilPageContent\readHierId(), ilPageContent\readPCId(), and setMediaObject().

{
parent::setNode($a_node); // this is the PageContent node
$this->iim_node = $a_node->first_child();
$this->med_alias_node = $this->iim_node->first_child();
if (is_object($this->med_alias_node) && $this->med_alias_node->myDOMNode != null)
{
$id = $this->med_alias_node->get_attribute("OriginId");
if (ilObject::_lookupType($mob_id) == "mob")
{
$this->setMediaObject(new ilObjMediaObject($mob_id));
}
}
include_once("./Services/COPage/classes/class.ilMediaAliasItem.php");
$this->std_alias_item = new ilMediaAliasItem($this->dom,
$this->readHierId(), "Standard", $this->readPCId(),
"InteractiveImage");
}

+ Here is the call graph for this function:

ilPCInteractiveImage::setStyleClass (   $a_class)

Set style class.

Parameters
string$a_classstyle class

Definition at line 208 of file class.ilPCInteractiveImage.php.

{
// check this
die("pcinteractiveimage: setstyleclass");
if (is_object($this->iim_node))
{
$mal_node = $this->iim_node->first_child();
if (is_object($mal_node))
{
if (!empty($a_class))
{
$mal_node->set_attribute("Class", $a_class);
}
else
{
if ($mal_node->has_attribute("Class"))
{
$mal_node->remove_attribute("Class");
}
}
}
}
}
ilPCInteractiveImage::setTriggerMarkerPositions (   $a_pos)

Set trigger marker position.

Parameters
arrayarray of strings (representing the marker positions for the trigger)

Definition at line 608 of file class.ilPCInteractiveImage.php.

References getTriggerNodes(), and MARKER.

{
$tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPcId());
for($i=0; $i < count($tr_nodes); $i++)
{
$tr_node = $tr_nodes[$i];
if ($tr_node->get_attribute("Type") == self::MARKER)
{
if (isset($a_pos["".$tr_node->get_attribute("Nr")]))
{
$pos = explode(",", $a_pos["".$tr_node->get_attribute("Nr")]);
$tr_node->set_attribute("MarkerX", (int) $pos[0]);
$tr_node->set_attribute("MarkerY", (int) $pos[1]);
}
}
}
}

+ Here is the call graph for this function:

ilPCInteractiveImage::setTriggerOverlayPositions (   $a_pos)

Set trigger overlay position.

Parameters
arrayarray of strings (representing the overlays for the trigger)

Definition at line 588 of file class.ilPCInteractiveImage.php.

References getTriggerNodes().

{
$tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPcId());
for($i=0; $i < count($tr_nodes); $i++)
{
$tr_node = $tr_nodes[$i];
if (isset($a_pos["".$tr_node->get_attribute("Nr")]))
{
$pos = explode(",", $a_pos["".$tr_node->get_attribute("Nr")]);
$tr_node->set_attribute("OverlayX", (int) $pos[0]);
$tr_node->set_attribute("OverlayY", (int) $pos[1]);
}
}
}

+ Here is the call graph for this function:

ilPCInteractiveImage::setTriggerOverlays (   $a_ovs)

Set trigger overlays.

Parameters
arrayarray of strings (representing the overlays for the trigger)

Definition at line 569 of file class.ilPCInteractiveImage.php.

References getTriggerNodes().

{
$tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPcId());
for($i=0; $i < count($tr_nodes); $i++)
{
$tr_node = $tr_nodes[$i];
if (isset($a_ovs["".$tr_node->get_attribute("Nr")]))
{
$tr_node->set_attribute("Overlay",
$a_ovs["".$tr_node->get_attribute("Nr")]);
}
}
}

+ Here is the call graph for this function:

ilPCInteractiveImage::setTriggerPopupPositions (   $a_pos)

Set trigger popup position.

Parameters
arrayarray of strings (representing the popup positions for the trigger)

Definition at line 631 of file class.ilPCInteractiveImage.php.

References getTriggerNodes().

{
$tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPcId());
for($i=0; $i < count($tr_nodes); $i++)
{
$tr_node = $tr_nodes[$i];
if (isset($a_pos["".$tr_node->get_attribute("Nr")]))
{
$pos = explode(",", $a_pos["".$tr_node->get_attribute("Nr")]);
$tr_node->set_attribute("PopupX", (int) $pos[0]);
$tr_node->set_attribute("PopupY", (int) $pos[1]);
}
}
}

+ Here is the call graph for this function:

ilPCInteractiveImage::setTriggerPopups (   $a_pops)

Set trigger popups.

Parameters
arrayarray of strings (representing the popups for the trigger)

Definition at line 671 of file class.ilPCInteractiveImage.php.

References getTriggerNodes().

{
$tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPcId());
for($i=0; $i < count($tr_nodes); $i++)
{
$tr_node = $tr_nodes[$i];
if (isset($a_pops["".$tr_node->get_attribute("Nr")]))
{
$pop = $a_pops["".$tr_node->get_attribute("Nr")];
$tr_node->set_attribute("PopupNr", $pop);
}
}
}

+ Here is the call graph for this function:

ilPCInteractiveImage::setTriggerPopupSize (   $a_size)

Set trigger popup size.

Parameters
arrayarray of strings (representing the popup sizes for the trigger)

Definition at line 651 of file class.ilPCInteractiveImage.php.

References $size, and getTriggerNodes().

{
$tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPcId());
for($i=0; $i < count($tr_nodes); $i++)
{
$tr_node = $tr_nodes[$i];
if (isset($a_size["".$tr_node->get_attribute("Nr")]))
{
$size = explode(",", $a_size["".$tr_node->get_attribute("Nr")]);
$tr_node->set_attribute("PopupWidth", (int) $size[0]);
$tr_node->set_attribute("PopupHeight", (int) $size[1]);
}
}
}

+ Here is the call graph for this function:

ilPCInteractiveImage::setTriggerTitles (   $a_titles)

Set trigger titles.

Parameters
arrayarray of strings (representing the titles for the trigger)

Definition at line 690 of file class.ilPCInteractiveImage.php.

References getTriggerNodes(), and setExtLinkTitle().

{
$tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPcId());
for($i=0; $i < count($tr_nodes); $i++)
{
$tr_node = $tr_nodes[$i];
if (isset($a_titles["".$tr_node->get_attribute("Nr")]))
{
$tr_node->set_attribute("Title",
$a_titles["".$tr_node->get_attribute("Nr")]);
$this->setExtLinkTitle($tr_node->get_attribute("Nr"),
$a_titles["".$tr_node->get_attribute("Nr")]);
}
}
}

+ Here is the call graph for this function:

Field Documentation

ilPCInteractiveImage::$dom

Definition at line 17 of file class.ilPCInteractiveImage.php.

ilPCInteractiveImage::$iim_node

Definition at line 18 of file class.ilPCInteractiveImage.php.

const ilPCInteractiveImage::AREA = "Area"

Definition at line 20 of file class.ilPCInteractiveImage.php.

Referenced by ilPCIIMTriggerTableGUI\fillRow().

const ilPCInteractiveImage::MARKER = "Marker"

Definition at line 21 of file class.ilPCInteractiveImage.php.

Referenced by setTriggerMarkerPositions().


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