ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilPCInteractiveImage Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 init ()
 
 readMediaObject (int $a_mob_id=0)
 
 setDomNode (DOMNode $dom_node)
 
 setMediaObject (ilObjMediaObject $a_mediaobject)
 
 getMediaObject ()
 
 createMediaObject ()
 
 create ()
 
 getStandardMediaItem ()
 
 getStandardAliasItem ()
 
 getBaseThumbnailTarget ()
 
 createAlias (ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
 
 dumpXML ()
 
 addContentPopup (?string $title=null)
 Add a tab. More...
 
 getPopups ()
 Get popup captions. More...
 
 savePopups (array $a_popups)
 Save popups. More...
 
 deletePopup (string $a_hier_id, string $a_pc_id)
 Delete popup. More...
 
 saveContentPopupTitle (string $nr, string $title)
 
 deletePopupByNr (string $nr)
 
 addTriggerArea (ilMediaAliasItem $a_alias_item, string $a_shape_type, string $a_coords, string $a_title)
 Add a new trigger. More...
 
 addTriggerMarker ()
 Add a new trigger marker. More...
 
 getTriggerNodes (string $a_hier_id, string $a_pc_id="")
 
 getTriggers ()
 
 deleteTrigger (ilMediaAliasItem $a_alias_item, int $a_nr)
 Delete Trigger. More...
 
 setTriggerOverlays (array $a_ovs)
 Set trigger overlays. More...
 
 deleteOverlay (string $file)
 
 setTriggerOverlayPositions (array $a_pos)
 Set trigger overlay position. More...
 
 setTriggerMarkerPositions (array $a_pos)
 Set trigger marker position. More...
 
 setTriggerPopupPositions (array $a_pos)
 Set trigger popup position. More...
 
 setTriggerPopupSize (array $a_size)
 Set trigger popup size. More...
 
 setTriggerPopups (array $a_pops)
 Set trigger popups. More...
 
 setTriggerTitles (array $a_titles)
 Set trigger titles. More...
 
 setExtLinkTitle (int $a_nr, string $a_title)
 
 createFromMobId (\ilPageObject $page, int $mob_id, string $hier_id, string $pc_id)
 
 getIIMModel ()
 
 setTriggerProperties (string $nr, string $title, string $shape_type, string $coords)
 
 setTriggerOverlay (string $nr, string $overlay, string $coords)
 
 setTriggerPopup (string $nr, string $popup, string $position, string $size)
 
 modifyPageContentPostXsl (string $a_output, string $a_mode, bool $a_abstract_only=false)
 
 getPopupDummy ()
 
 getBackgroundImage ()
 
- Public Member Functions inherited from ilPageContent
 __construct (ilPageObject $a_pg_obj, ?PageManagerInterface $page_manager=null, ?ObjectAdapterInterface $object_adapter=null)
 
 setPage (ilPageObject $a_val)
 
 getPage ()
 
 init ()
 Init object. More...
 
 getType ()
 
 getDomNode ()
 
 getDomDoc ()
 
 setDomNode (DOMNode $node)
 
 getChildNode ()
 
 getJavascriptFiles (string $a_mode)
 
 getCssFiles (string $a_mode)
 
 getOnloadCode (string $a_mode)
 
 setHierId (string $a_hier_id)
 
 getHierId ()
 
 lookupHierId ()
 
 readHierId ()
 
 setPcId (string $a_pcid)
 
 getPCId ()
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setProfileBackUrl (string $url)
 
 getProfileBackUrl ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 readPCId ()
 
 writePCId (string $a_pc_id)
 
 setEnabled (string $value)
 Set Enabled value for page content component. More...
 
 enable ()
 
 disable ()
 
 isEnabled ()
 
 createPageContentNode (bool $a_set_this_node=true)
 Create page content node (always use this method first when adding a new element) More...
 
 getNewPageContentNode ()
 
 modifyPageContentPostXsl (string $a_output, string $a_mode, bool $a_abstract_only=false)
 Modify page content after xsl. More...
 
 getModel ()
 Get model as needed for the front-end editor. More...
 

Static Public Member Functions

static handleCopiedContent (DOMDocument $a_domdoc, bool $a_self_ass=true, bool $a_clone_mobs=false, int $new_parent_id=0, int $obj_copy_id=0)
 
- Static Public Member Functions inherited from ilPageContent
static sortHierIds (array $a_array)
 Sort an array of Hier IDS in ascending order. More...
 
static isGreaterHierId (string $a, string $b)
 Check whether Hier ID $a is greater than Hier ID $b. More...
 
static getLangVars ()
 Get lang vars needed for editing. More...
 
static handleCopiedContent (DOMDocument $a_domdoc, bool $a_self_ass=true, bool $a_clone_mobs=false, int $new_parent_id=0, int $obj_copy_id=0)
 Handle copied content. More...
 
static afterPageUpdate (ilPageObject $a_page, DOMDocument $a_domdoc, string $a_xml, bool $a_creation)
 After page has been updated (or created) More...
 
static beforePageDelete (ilPageObject $a_page)
 Before page is being deleted. More...
 
static afterRepositoryCopy (ilPageObject $page, array $mapping, int $source_ref_id)
 After repository (container) copy action. More...
 
static afterPageHistoryEntry (ilPageObject $a_page, DOMDocument $a_old_domdoc, string $a_old_xml, int $a_old_nr)
 After page history entry has been created. More...
 
static deleteHistoryLowerEqualThan (string $parent_type, int $page_id, string $lang, int $delete_lower_than_nr)
 Overwrite in derived classes, if old history entries are being deleted. More...
 

Data Fields

const AREA = "Area"
 
const MARKER = "Marker"
 
DOMNode $iim_node
 
- Data Fields inherited from ilPageContent
string $hier_id = ""
 
DOMNode $dom_node = null
 
string $page_lang = ""
 

Protected Member Functions

 setMapAreaProperties (ilMediaAliasItem $a_alias_item, string $a_shape_type, string $a_coords, string $a_title, string $a_id)
 
 getTriggerNode (string $nr)
 
- Protected Member Functions inherited from ilPageContent
 getPageManager ()
 
 setType (string $a_type)
 Set Type. More...
 
 hasNode ()
 
 createInitialChildNode (string $hier_id, string $pc_id, string $child, array $child_attributes=[])
 

Protected Attributes

ILIAS MediaObjects Thumbs ThumbsManager $thumbs
 
ILIAS COPage Xsl XslManager $xsl
 
DOMNode $mal_node
 
DOMNode $med_alias_node
 
ILIAS DI UIServices $ui
 
ILIAS COPage Html TransformUtil $htmlTransform
 
ILIAS COPage PC InteractiveImage IIMManager $manager
 
ilMediaAliasItem $std_alias_item
 
ilObjMediaObject $mediaobject
 
ilLanguage $lng
 
- Protected Attributes inherited from ilPageContent
DOMDocument $dom_doc
 
ILIAS COPage InternalDomainService $domain
 
string $pcid
 
string $type = ""
 
ilPageObject $pg_obj
 
string $file_download_link
 
string $fullscreen_link
 
string $sourcecode_download_script
 
ilLogger $log
 
string $profile_back_url = ""
 
ILIAS COPage Dom DomUtil $dom_util
 
PageManagerInterface $page_manager = null
 
ObjectAdapterInterface $object = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Interactive image.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Member Function Documentation

◆ addContentPopup()

ilPCInteractiveImage::addContentPopup ( ?string  $title = null)

Add a tab.

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

References $lng, getPopups(), null, and ilLanguage\txt().

173  : void
174  {
175  $lng = $this->lng;
176 
177  if ($title === null) {
178  $title = $lng->txt("cont_new_popup");
179  }
180  $max = 0;
181  $popups = $this->getPopups();
182  foreach ($popups as $p) {
183  $max = max($max, (int) $p["nr"]);
184  }
185 
186  $new_item = $this->dom_doc->createElement("ContentPopup");
187  $new_item->setAttribute("Title", $title);
188  $new_item->setAttribute("Nr", $max + 1);
189  $new_item = $this->iim_node->appendChild($new_item);
190  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getPopups()
Get popup captions.
+ Here is the call graph for this function:

◆ addTriggerArea()

ilPCInteractiveImage::addTriggerArea ( ilMediaAliasItem  $a_alias_item,
string  $a_shape_type,
string  $a_coords,
string  $a_title 
)

Add a new trigger.

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

References getTriggers(), setMapAreaProperties(), and ilUtil\stripSlashes().

Referenced by setTriggerProperties().

312  : void {
313  $max = 0;
314  $triggers = $this->getTriggers();
315  foreach ($triggers as $t) {
316  $max = max($max, (int) $t["Nr"]);
317  }
318 
319  $this->setMapAreaProperties(
320  $a_alias_item,
321  $a_shape_type,
322  $a_coords,
323  ilUtil::stripSlashes($a_title),
324  (string) ($max + 1)
325  );
326 
327  $attributes = array("Type" => self::AREA,
328  "Title" => ilUtil::stripSlashes($a_title),
329  "Nr" => $max + 1,
330  "OverlayX" => "0",
331  "OverlayY" => "0",
332  "Overlay" => "",
333  "PopupNr" => "",
334  "PopupX" => "0",
335  "PopupY" => "0",
336  "PopupWidth" => "150",
337  "PopupHeight" => "200"
338  );
339  $ma_node = $this->dom_util->addElementToList(
340  $this->iim_node,
341  "Trigger",
342  array("ContentPopup"),
343  "",
344  $attributes
345  );
346  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
setMapAreaProperties(ilMediaAliasItem $a_alias_item, string $a_shape_type, string $a_coords, string $a_title, string $a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTriggerMarker()

ilPCInteractiveImage::addTriggerMarker ( )

Add a new trigger marker.

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

References $lng, getTriggers(), and ilLanguage\txt().

351  : void
352  {
353  $lng = $this->lng;
354 
355  $max = 0;
356  $triggers = $this->getTriggers();
357  foreach ($triggers as $t) {
358  $max = max($max, (int) $t["Nr"]);
359  }
360 
361  $attributes = array("Type" => self::MARKER,
362  "Title" => $lng->txt("cont_new_marker"),
363  "Nr" => $max + 1,
364  "OverlayX" => "0",
365  "OverlayY" => "0",
366  "MarkerX" => "0",
367  "MarkerY" => "0",
368  "PopupNr" => "",
369  "PopupX" => "0",
370  "PopupY" => "0",
371  "PopupWidth" => "150",
372  "PopupHeight" => "200"
373  );
374  $ma_node = $this->dom_util->addElementToList(
375  $this->iim_node,
376  "Trigger",
377  array("ContentPopup"),
378  "",
379  $attributes
380  );
381  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:

◆ create()

ilPCInteractiveImage::create ( )

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

References ilPageContent\createPageContentNode().

100  : void
101  {
102  $this->createPageContentNode();
103  }
createPageContentNode(bool $a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
+ Here is the call graph for this function:

◆ createAlias()

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

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

References ilPageContent\getDomNode(), ILIAS\Survey\Mode\getId(), getMediaObject(), IL_INSERT_AFTER, ilPageObject\insertContent(), and setDomNode().

Referenced by createFromMobId().

124  : void {
125  $this->setDomNode($this->dom_doc->createElement("PageContent"));
126  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
127  $this->iim_node = $this->dom_doc->createElement("InteractiveImage");
128  $this->iim_node = $this->getDomNode()->appendChild($this->iim_node);
129  $this->mal_node = $this->dom_doc->createElement("MediaAlias");
130  $this->mal_node = $this->iim_node->appendChild($this->mal_node);
131  $this->mal_node->setAttribute("OriginId", "il__mob_" . $this->getMediaObject()->getId());
132 
133  // standard view
134  $item_node = $this->dom_doc->createElement("MediaAliasItem");
135  $item_node = $this->iim_node->appendChild($item_node);
136  $item_node->setAttribute("Purpose", "Standard");
137  $media_item = $this->getMediaObject()->getMediaItem("Standard");
138 
139  $layout_node = $this->dom_doc->createElement("Layout");
140  $layout_node = $item_node->appendChild($layout_node);
141  $layout_node->setAttribute("HorizontalAlign", "Left");
142 
143  // caption
144  if ($media_item->getCaption() != "") {
145  $cap_node = $this->dom_doc->createElement("Caption");
146  $cap_node = $item_node->appendChild($cap_node);
147  $cap_node->setAttribute("Align", "bottom");
148  $this->dom_util->setContent($cap_node, $media_item->getCaption());
149  }
150 
151  // text representation
152  if ($media_item->getTextRepresentation() != "") {
153  $tr_node = $this->dom_doc->createElement("TextRepresentation");
154  $tr_node = $item_node->appendChild($tr_node);
155  $this->dom_util->setContent($tr_node, $media_item->getTextRepresentation());
156  }
157  }
insertContent(ilPageContent $a_cont_obj, string $a_pos, int $a_mode=IL_INSERT_AFTER, string $a_pcid="", bool $remove_placeholder=true)
insert a content node before/after a sibling or as first child of a parent
const IL_INSERT_AFTER
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createFromMobId()

ilPCInteractiveImage::createFromMobId ( \ilPageObject  $page,
int  $mob_id,
string  $hier_id,
string  $pc_id 
)

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

References createAlias(), and setMediaObject().

633  : void {
634  $this->setMediaObject(new ilObjMediaObject($mob_id));
635  $this->createAlias($page, $hier_id, $pc_id);
636  }
createAlias(ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
setMediaObject(ilObjMediaObject $a_mediaobject)
+ Here is the call graph for this function:

◆ createMediaObject()

ilPCInteractiveImage::createMediaObject ( )

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

References setMediaObject().

95  : void
96  {
97  $this->setMediaObject(new ilObjMediaObject());
98  }
setMediaObject(ilObjMediaObject $a_mediaobject)
+ Here is the call graph for this function:

◆ deleteOverlay()

ilPCInteractiveImage::deleteOverlay ( string  $file)

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

References getMediaObject(), ilPageContent\getPCId(), getTriggerNodes(), and ilUtil\stripSlashes().

459  : void
460  {
461  $file = str_replace("..", "", ilUtil::stripSlashes($file));
462  $this->getMediaObject()
463  ->removeAdditionalFile("overlays/" . $file);
464  $tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPCId());
465  for ($i = 0; $i < count($tr_nodes); $i++) {
466  $tr_node = $tr_nodes[$i];
467  if ($tr_node->getAttribute("Overlay") === $file) {
468  $tr_node->removeAttribute("Overlay");
469  }
470  }
471  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
getTriggerNodes(string $a_hier_id, string $a_pc_id="")
+ Here is the call graph for this function:

◆ deletePopup()

ilPCInteractiveImage::deletePopup ( string  $a_hier_id,
string  $a_pc_id 
)

Delete popup.

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

References $c.

238  : void {
239  foreach ($this->iim_node->childNodes as $c) {
240  if ($c->nodeName === "ContentPopup") {
241  if ($a_pc_id == $c->getAttribute("PCID") &&
242  $a_hier_id == $c->getAttribute("HierId")) {
243  $c->parentNode->removeChild($c);
244  }
245  }
246  }
247  }
$c
Definition: deliver.php:25

◆ deletePopupByNr()

ilPCInteractiveImage::deletePopupByNr ( string  $nr)

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

References $c, ilPageContent\getPCId(), and getTriggerNodes().

262  : void {
263  foreach ($this->iim_node->childNodes as $c) {
264  if ($c->nodeName === "ContentPopup") {
265  if ($nr === $c->getAttribute("Nr")) {
266  $c->parentNode->removeChild($c);
267  }
268  }
269  }
270  $tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPCId());
271  foreach ($tr_nodes as $tr_node) {
272  if ($tr_node->getAttribute("PopupNr") === $nr) {
273  $tr_node->removeAttribute("PopupNr");
274  }
275  }
276  }
$c
Definition: deliver.php:25
getTriggerNodes(string $a_hier_id, string $a_pc_id="")
+ Here is the call graph for this function:

◆ deleteTrigger()

ilPCInteractiveImage::deleteTrigger ( ilMediaAliasItem  $a_alias_item,
int  $a_nr 
)

Delete Trigger.

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

References $c, and ilMediaAliasItem\deleteMapAreaById().

430  : void {
431  foreach ($this->iim_node->childNodes as $c) {
432  if ($c->nodeName === "Trigger") {
433  if ($a_nr === (int) $c->getAttribute("Nr")) {
434  $c->parentNode->removeChild($c);
435  }
436  }
437  }
438  $a_alias_item->deleteMapAreaById($a_nr);
439  }
$c
Definition: deliver.php:25
deleteMapAreaById(string $a_id)
Delete map areas by id.
+ Here is the call graph for this function:

◆ dumpXML()

ilPCInteractiveImage::dumpXML ( )

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

References ilPageContent\getDomNode().

159  : string
160  {
161  $xml = $this->dom_util->dump($this->getDomNode());
162  return $xml;
163  }
+ Here is the call graph for this function:

◆ getBackgroundImage()

ilPCInteractiveImage::getBackgroundImage ( )

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

References $params, ilUtil\getImagePath(), getMediaObject(), ilFileUtils\getWebspaceDir(), IL_MODE_ALIAS, and IL_MODE_OUTPUT.

Referenced by ILIAS\COPage\PC\InteractiveImage\InteractiveImageCommandActionHandler\getStandardResponse().

795  : string
796  {
797  $mob = $this->getMediaObject();
798 
799  // output image map
800  $xml = "<dummy>";
801  $xml .= $mob->getXML(IL_MODE_ALIAS);
802  $xml .= $mob->getXML(IL_MODE_OUTPUT);
803  $xml .= "</dummy>";
804  $wb_path = \ilFileUtils::getWebspaceDir("output") . "/";
805  $params = array(
806  'media_mode' => 'enable',
807  'pg_frame' => "",
808  'enlarge_path' => \ilUtil::getImagePath("enlarge.svg"),
809  'webspace_path' => $wb_path);
810 
811  $output = $this->xsl->process($xml, $params);
812  return $output;
813  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
const IL_MODE_ALIAS
const IL_MODE_OUTPUT
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBaseThumbnailTarget()

ilPCInteractiveImage::getBaseThumbnailTarget ( )

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

References ILIAS\Survey\Mode\getId(), and getMediaObject().

115  : string
116  {
117  return $this->thumbs->getThumbSrc($this->getMediaObject()->getId());
118  }
+ Here is the call graph for this function:

◆ getIIMModel()

ilPCInteractiveImage::getIIMModel ( )

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

References getMediaObject(), getPopups(), getStandardAliasItem(), and getTriggers().

Referenced by ILIAS\COPage\PC\InteractiveImage\InteractiveImageCommandActionHandler\getStandardResponse().

638  : ?stdClass
639  {
640  $alias_item = $this->getStandardAliasItem();
641  $model = new \stdClass();
642  $model->triggers = $this->getTriggers();
643  $model->popups = $this->getPopups();
644  $model->media_item = $alias_item->getModel();
645  $model->overlays = $this->manager->getOverlays($this->getMediaObject());
646  return $model;
647  }
getPopups()
Get popup captions.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMediaObject()

ilPCInteractiveImage::getMediaObject ( )

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

References $mediaobject.

Referenced by createAlias(), deleteOverlay(), getBackgroundImage(), getBaseThumbnailTarget(), getIIMModel(), and getStandardMediaItem().

+ Here is the caller graph for this function:

◆ getPopupDummy()

ilPCInteractiveImage::getPopupDummy ( )

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

783  : string
784  {
785  $content = <<<EOT
786 <div style='position:relative'><div class='copg-iim-popup copg-iim-popup-md' data-copg-cont-type='iim-popup'>
787 <div class="ilc_iim_ContentPopup" data-copg-iim-data-type="popup"><div class="ilc_Paragraph ilc_text_block_Standard">
788 ###content###
789 </div></div></div></div>
790 
791 EOT;
792  return $content;
793  }

◆ getPopups()

ilPCInteractiveImage::getPopups ( )

Get popup captions.

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

References $c, and ilPageContent\$hier_id.

Referenced by addContentPopup(), and getIIMModel().

195  : array
196  {
197  $titles = array();
198  $k = 0;
199  foreach ($this->iim_node->childNodes as $c) {
200  if ($c->nodeName == "ContentPopup") {
201  $pc_id = $c->getAttribute("PCID");
202  $hier_id = $c->getAttribute("HierId");
203  $title = $c->getAttribute("Title");
204  $nr = $c->getAttribute("Nr");
205 
206  $titles[] = array("title" => $title,
207  "nr" => $nr,
208  "pc_id" => $pc_id,
209  "hier_id" => $hier_id
210  );
211  $k++;
212  }
213  }
214  return $titles;
215  }
$c
Definition: deliver.php:25
+ Here is the caller graph for this function:

◆ getStandardAliasItem()

ilPCInteractiveImage::getStandardAliasItem ( )

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

References $std_alias_item.

Referenced by getIIMModel(), and setTriggerProperties().

111  {
112  return $this->std_alias_item;
113  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getStandardMediaItem()

ilPCInteractiveImage::getStandardMediaItem ( )

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

References getMediaObject().

105  : ilMediaItem
106  {
107  return $this->getMediaObject()->getMediaItem("Standard");
108  }
Class ilMediaItem Media Item, component of a media object (file or reference)
+ Here is the call graph for this function:

◆ getTriggerNode()

ilPCInteractiveImage::getTriggerNode ( string  $nr)
protected

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

References ilPageContent\getPCId(), getTriggerNodes(), and null.

Referenced by setTriggerOverlay(), setTriggerPopup(), and setTriggerProperties().

650  {
651  $tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPCId());
652  for ($i = 0; $i < count($tr_nodes); $i++) {
653  $tr_node = $tr_nodes[$i];
654  if ($tr_node->getAttribute("Nr") == $nr) {
655  return $tr_node;
656  }
657  }
658  return null;
659  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getTriggerNodes(string $a_hier_id, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTriggerNodes()

ilPCInteractiveImage::getTriggerNodes ( string  $a_hier_id,
string  $a_pc_id = "" 
)

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

References $path.

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

386  : DOMNodeList {
387  if ($a_pc_id != "") {
388  $path = "//PageContent[@PCID = '" . $a_pc_id . "']/InteractiveImage/Trigger";
389  return $this->dom_util->path($this->dom_doc, $path);
390  }
391 
392  $path = "//PageContent[@HierId = '" . $a_hier_id . "']/InteractiveImage/Trigger";
393  return $this->dom_util->path($this->dom_doc, $path);
394  }
$path
Definition: ltiservices.php:29
+ Here is the caller graph for this function:

◆ getTriggers()

ilPCInteractiveImage::getTriggers ( )

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

References ilPageContent\getPCId(), and getTriggerNodes().

Referenced by addTriggerArea(), addTriggerMarker(), and getIIMModel().

396  : array
397  {
398  $tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPCId());
399  $trigger_arr = array();
400  foreach ($tr_nodes as $tr_node) {
401  $childs = $tr_node->childNodes;
402  $trigger_arr[] = array(
403  "Nr" => $tr_node->getAttribute("Nr"),
404  "Type" => $tr_node->getAttribute("Type"),
405  "Title" => $tr_node->getAttribute("Title"),
406  "OverlayX" => $tr_node->getAttribute("OverlayX"),
407  "OverlayY" => $tr_node->getAttribute("OverlayY"),
408  "MarkerX" => $tr_node->getAttribute("MarkerX"),
409  "MarkerY" => $tr_node->getAttribute("MarkerY"),
410  "Overlay" => $tr_node->getAttribute("Overlay"),
411  "PopupNr" => $tr_node->getAttribute("PopupNr"),
412  "PopupX" => $tr_node->getAttribute("PopupX"),
413  "PopupY" => $tr_node->getAttribute("PopupY"),
414  "PopupWidth" => $tr_node->getAttribute("PopupWidth"),
415  "PopupHeight" => $tr_node->getAttribute("PopupHeight"),
416  "PopupPosition" => $tr_node->getAttribute("PopupPosition"),
417  "PopupSize" => $tr_node->getAttribute("PopupSize")
418  );
419  }
420 
421  return $trigger_arr;
422  }
getTriggerNodes(string $a_hier_id, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleCopiedContent()

static ilPCInteractiveImage::handleCopiedContent ( DOMDocument  $a_domdoc,
bool  $a_self_ass = true,
bool  $a_clone_mobs = false,
int  $new_parent_id = 0,
int  $obj_copy_id = 0 
)
static

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

References $DIC, ilPageContent\$dom_util, $path, ilInternalLink\_extractInstOfTarget(), and ilInternalLink\_extractObjIdOfTarget().

608  : void {
609  global $DIC;
610 
611  $dom_util = $DIC->copage()->internal()->domain()->domUtil();
612  $path = "//InteractiveImage/MediaAlias";
613  $nodes = $dom_util->path($a_domdoc, $path);
614  foreach ($nodes as $node) {
615  $or_id = $node->getAttribute("OriginId");
616  $inst_id = ilInternalLink::_extractInstOfTarget($or_id);
617  $mob_id = ilInternalLink::_extractObjIdOfTarget($or_id);
618  if (!($inst_id > 0)) {
619  if ($mob_id > 0) {
620  $media_object = new ilObjMediaObject($mob_id);
621  $new_mob = $media_object->duplicate();
622  $node->setAttribute("OriginId", "il__mob_" . $new_mob->getId());
623  }
624  }
625  }
626  }
$path
Definition: ltiservices.php:29
global $DIC
Definition: shib_login.php:22
ILIAS COPage Dom DomUtil $dom_util
+ Here is the call graph for this function:

◆ init()

ilPCInteractiveImage::init ( )

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

References $DIC, ILIAS\Repository\lng(), ilPageContent\setType(), and ILIAS\Repository\ui().

41  : void
42  {
43  global $DIC;
44 
45  $this->lng = $DIC->language();
46  $this->setType("iim");
47  $this->manager = $DIC->copage()->internal()->domain()->pc()->interactiveImage();
48  $this->htmlTransform = $DIC->copage()->internal()->domain()->htmlTransformUtil();
49  $this->ui = $DIC->copage()->internal()->gui()->ui();
50  $this->xsl = $DIC->copage()->internal()->domain()->xsl();
51  $this->thumbs = $DIC->mediaObjects()->internal()->domain()->thumbs();
52  }
setType(string $a_type)
Set Type.
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

◆ modifyPageContentPostXsl()

ilPCInteractiveImage::modifyPageContentPostXsl ( string  $a_output,
string  $a_mode,
bool  $a_abstract_only = false 
)

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

References $htmlTransform, $params, ilPageObjectGUI\EDIT, and ILIAS\Repository\ui().

736  : string {
737  $keep_original = false;
738  if (in_array($a_mode, [ilPageObjectGUI::EDIT], true)) {
739  $keep_original = true;
740  }
741  $trans = $this->htmlTransform;
742  while (!is_null($params = $trans->getPlaceholderParams($a_output, "InteractiveImage;PopupStart"))) {
743  $params = $trans->getPlaceholderParams($a_output, "InteractiveImage;PopupStart");
744  $par_page = $params[2] ?? 0;
745  $par_pop_nr = $params[4] ?? 0;
746  $inner = $trans->getInnerContentOfPlaceholders(
747  $a_output,
748  "InteractiveImage;PopupStart",
749  "InteractiveImage;PopupEnd"
750  );
751  if ($keep_original) {
752  $new_inner = $inner;
753  } else {
754  $pop = $this->ui->factory()->popover()->standard(
755  $this->ui->factory()->legacy()->content("#####popovercontent#####")
756  );
757  $signal_id = $pop->getShowSignal()->getId();
758  //$new_inner = $this->ui->renderer()->render($pop);
759  $new_inner = "#####popovercontent#####";
760  // we need a position relative around the absolute inner div, to make 100% the current available space
761  $new_inner = str_replace(
762  "#####popovercontent#####",
763  "<div style='position:relative'><div class='copg-iim-popup copg-iim-popup-md' style='display:none;' data-copg-cont-type='iim-popup' data-signal-id='$signal_id' data-copg-page='$par_page' data-copg-popup-nr='$par_pop_nr'>" . $inner . "</div></div>",
764  $new_inner
765  );
766  }
767  $html = $trans->replaceInnerContentAndPlaceholders(
768  $a_output,
769  "InteractiveImage;PopupStart",
770  "InteractiveImage;PopupEnd",
771  $new_inner
772  );
773  if (is_null($html)) {
774  break;
775  } else {
776  $a_output = $html;
777  }
778  }
779  return $a_output .
780 '<script type="module" src="./components/ILIAS/COPage/PC/InteractiveImage/js/presentation/src/presentation.js"></script>';
781  }
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
ILIAS COPage Html TransformUtil $htmlTransform
+ Here is the call graph for this function:

◆ readMediaObject()

ilPCInteractiveImage::readMediaObject ( int  $a_mob_id = 0)

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

References setMediaObject().

54  : void
55  {
56  if ($a_mob_id > 0) {
57  $mob = new ilObjMediaObject($a_mob_id);
58  $this->setMediaObject($mob);
59  }
60  }
setMediaObject(ilObjMediaObject $a_mediaobject)
+ Here is the call graph for this function:

◆ saveContentPopupTitle()

ilPCInteractiveImage::saveContentPopupTitle ( string  $nr,
string  $title 
)

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

References $c.

249  : void
250  {
251  foreach ($this->iim_node->childNodes as $c) {
252  if ($c->nodeName === "ContentPopup") {
253  if ($nr === $c->getAttribute("Nr")) {
254  $c->setAttribute("Title", $title);
255  }
256  }
257  }
258  }
$c
Definition: deliver.php:25

◆ savePopups()

ilPCInteractiveImage::savePopups ( array  $a_popups)

Save popups.

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

References $c, and ilPageContent\$hier_id.

220  : void
221  {
222  foreach ($this->iim_node->childNodes as $c) {
223  if ($c->nodeName == "ContentPopup") {
224  $pc_id = $c->getAttribute("PCID");
225  $hier_id = $c->getAttribute("HierId");
226  $k = $hier_id . ":" . $pc_id;
227  $c->setAttribute("Title", $a_popups[$k]);
228  }
229  }
230  }
$c
Definition: deliver.php:25

◆ setDomNode()

ilPCInteractiveImage::setDomNode ( DOMNode  $dom_node)

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

References $id, ilInternalLink\_extractObjIdOfTarget(), ilPageContent\getDomDoc(), ILIAS\Repository\object(), ilPageContent\readHierId(), ilPageContent\readPCId(), and setMediaObject().

Referenced by createAlias().

62  : void
63  {
64  parent::setDomNode($dom_node); // this is the PageContent node
65  $this->iim_node = $dom_node->firstChild;
66  if (isset($this->iim_node)) {
67  $this->med_alias_node = $this->iim_node->firstChild;
68  }
69  if (isset($this->med_alias_node)) {
70  $id = $this->med_alias_node->getAttribute("OriginId");
72  if ($this->object->getTypeForObjId($mob_id) == "mob") {
73  $this->setMediaObject(new ilObjMediaObject($mob_id));
74  }
75  }
76  $this->std_alias_item = new ilMediaAliasItem(
77  $this->getDomDoc(),
78  $this->readHierId(),
79  "Standard",
80  $this->readPCId(),
81  "InteractiveImage"
82  );
83  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setMediaObject(ilObjMediaObject $a_mediaobject)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setExtLinkTitle()

ilPCInteractiveImage::setExtLinkTitle ( int  $a_nr,
string  $a_title 
)

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

References $path, $res, and ilPageContent\getPCId().

Referenced by setTriggerTitles().

585  : void {
586  if ($this->getPCId() != "") {
587  $path = "//PageContent[@PCID = '" . $this->getPCId() . "']/InteractiveImage/MediaAliasItem/MapArea[@Id='" . $a_nr . "']/ExtLink";
588  $res = $this->dom_util->path($this->dom_doc, $path);
589  if (count($res) > 0) {
590  $this->dom_util->setContent($res->item(0), $a_title);
591  }
592  return;
593  }
594 
595  $path = "//PageContent[@HierId = '" . $this->hier_id . "']/InteractiveImage/MediaAliasItem/MapArea[@Id='" . $a_nr . "']/ExtLink";
596  $res = $this->dom_util->path($this->dom_doc, $path);
597  if (count($res) > 0) {
598  $this->dom_util->setContent($res->item(0), $a_title);
599  }
600  }
$res
Definition: ltiservices.php:66
$path
Definition: ltiservices.php:29
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMapAreaProperties()

ilPCInteractiveImage::setMapAreaProperties ( ilMediaAliasItem  $a_alias_item,
string  $a_shape_type,
string  $a_coords,
string  $a_title,
string  $a_id 
)
protected

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

References ilMediaAliasItem\addMapArea(), ilMediaAliasItem\deleteMapAreaById(), IL_EXT_LINK, and ilUtil\stripSlashes().

Referenced by addTriggerArea(), and setTriggerProperties().

288  {
289  $link = array(
290  "LinkType" => IL_EXT_LINK,
291  "Href" => ilUtil::stripSlashes("#")
292  );
293 
294  $a_alias_item->deleteMapAreaById($a_id);
295  $a_alias_item->addMapArea(
296  $a_shape_type,
297  $a_coords,
298  ilUtil::stripSlashes($a_title),
299  $link,
300  $a_id
301  );
302  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
addMapArea(string $a_shape_type, string $a_coords, string $a_title, array $a_link, string $a_id="")
Add a new area to the map.
const IL_EXT_LINK
deleteMapAreaById(string $a_id)
Delete map areas by id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMediaObject()

ilPCInteractiveImage::setMediaObject ( ilObjMediaObject  $a_mediaobject)

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

Referenced by createFromMobId(), createMediaObject(), readMediaObject(), and setDomNode().

85  : void
86  {
87  $this->mediaobject = $a_mediaobject;
88  }
+ Here is the caller graph for this function:

◆ setTriggerMarkerPositions()

ilPCInteractiveImage::setTriggerMarkerPositions ( array  $a_pos)

Set trigger marker position.

Parameters
array$a_posarray of strings (representing the marker positions for the trigger)

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

References ilPageContent\getPCId(), and getTriggerNodes().

497  : void {
498  $tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPCId());
499  foreach ($tr_nodes as $tr_node) {
500  if ($tr_node->getAttribute("Type") == self::MARKER) {
501  if (isset($a_pos["" . $tr_node->getAttribute("Nr")])) {
502  $pos = explode(",", $a_pos["" . $tr_node->getAttribute("Nr")]);
503  $tr_node->setAttribute("MarkerX", (int) $pos[0]);
504  $tr_node->setAttribute("MarkerY", (int) $pos[1]);
505  }
506  }
507  }
508  }
getTriggerNodes(string $a_hier_id, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setTriggerOverlay()

ilPCInteractiveImage::setTriggerOverlay ( string  $nr,
string  $overlay,
string  $coords 
)

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

References $c, getTriggerNode(), and ILIAS\Repository\int().

709  : void
710  {
711  $tr_node = $this->getTriggerNode($nr);
712  if ($tr_node) {
713  $c = explode(",", $coords);
714  $x = (int) ($c[0] ?? 0);
715  $y = (int) ($c[1] ?? 0);
716  $tr_node->setAttribute("Overlay", $overlay);
717  $tr_node->setAttribute("OverlayX", $x);
718  $tr_node->setAttribute("OverlayY", $y);
719  }
720  }
$c
Definition: deliver.php:25
+ Here is the call graph for this function:

◆ setTriggerOverlayPositions()

ilPCInteractiveImage::setTriggerOverlayPositions ( array  $a_pos)

Set trigger overlay position.

Parameters
array$a_posarray of strings (representing the overlays for the trigger)

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

References ilPageContent\getPCId(), and getTriggerNodes().

479  : void {
480  $tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPCId());
481  for ($i = 0; $i < count($tr_nodes); $i++) {
482  $tr_node = $tr_nodes[$i];
483  if (isset($a_pos["" . $tr_node->getAttribute("Nr")])) {
484  $pos = explode(",", $a_pos["" . $tr_node->getAttribute("Nr")]);
485  $tr_node->setAttribute("OverlayX", (int) $pos[0]);
486  $tr_node->setAttribute("OverlayY", (int) $pos[1]);
487  }
488  }
489  }
getTriggerNodes(string $a_hier_id, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setTriggerOverlays()

ilPCInteractiveImage::setTriggerOverlays ( array  $a_ovs)

Set trigger overlays.

Parameters
array$a_ovsarray of strings (representing the overlays for the trigger)

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

References ilPageContent\getPCId(), and getTriggerNodes().

447  : void {
448  $tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPCId());
449  foreach ($tr_nodes as $tr_node) {
450  if (isset($a_ovs["" . $tr_node->getAttribute("Nr")])) {
451  $tr_node->setAttribute(
452  "Overlay",
453  $a_ovs["" . $tr_node->getAttribute("Nr")]
454  );
455  }
456  }
457  }
getTriggerNodes(string $a_hier_id, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setTriggerPopup()

ilPCInteractiveImage::setTriggerPopup ( string  $nr,
string  $popup,
string  $position,
string  $size 
)

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

References getTriggerNode().

722  : void
723  {
724  $tr_node = $this->getTriggerNode($nr);
725  if ($tr_node) {
726  $tr_node->setAttribute("PopupNr", $popup);
727  $tr_node->setAttribute("PopupPosition", $position);
728  $tr_node->setAttribute("PopupSize", $size);
729  }
730  }
+ Here is the call graph for this function:

◆ setTriggerPopupPositions()

ilPCInteractiveImage::setTriggerPopupPositions ( array  $a_pos)

Set trigger popup position.

Parameters
array$a_posarray of strings (representing the popup positions for the trigger)

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

References ilPageContent\getPCId(), and getTriggerNodes().

516  : void {
517  $tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPCId());
518  foreach ($tr_nodes as $tr_node) {
519  if (isset($a_pos["" . $tr_node->getAttribute("Nr")])) {
520  $pos = explode(",", $a_pos["" . $tr_node->getAttribute("Nr")]);
521  $tr_node->setAttribute("PopupX", (int) $pos[0]);
522  $tr_node->setAttribute("PopupY", (int) $pos[1]);
523  }
524  }
525  }
getTriggerNodes(string $a_hier_id, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setTriggerPopups()

ilPCInteractiveImage::setTriggerPopups ( array  $a_pops)

Set trigger popups.

Parameters
array$a_popsarray of strings (representing the popups for the trigger)

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

References ilPageContent\getPCId(), and getTriggerNodes().

550  : void {
551  $tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPCId());
552  foreach ($tr_nodes as $tr_node) {
553  if (isset($a_pops[(string) $tr_node->getAttribute("Nr")])) {
554  $pop = $a_pops[(string) $tr_node->getAttribute("Nr")];
555  $tr_node->setAttribute("PopupNr", $pop);
556  }
557  }
558  }
getTriggerNodes(string $a_hier_id, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setTriggerPopupSize()

ilPCInteractiveImage::setTriggerPopupSize ( array  $a_size)

Set trigger popup size.

Parameters
array$a_sizearray of strings (representing the popup sizes for the trigger)

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

References ilPageContent\getPCId(), and getTriggerNodes().

533  : void {
534  $tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPCId());
535  foreach ($tr_nodes as $tr_node) {
536  if (isset($a_size["" . $tr_node->getAttribute("Nr")])) {
537  $size = explode(",", $a_size["" . $tr_node->getAttribute("Nr")]);
538  $tr_node->setAttribute("PopupWidth", (int) $size[0]);
539  $tr_node->setAttribute("PopupHeight", (int) $size[1]);
540  }
541  }
542  }
getTriggerNodes(string $a_hier_id, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setTriggerProperties()

ilPCInteractiveImage::setTriggerProperties ( string  $nr,
string  $title,
string  $shape_type,
string  $coords 
)

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

References $path, addTriggerArea(), getStandardAliasItem(), getTriggerNode(), setMapAreaProperties(), and ilUtil\stripSlashes().

661  : void
662  {
663  $tr_node = $this->getTriggerNode($nr);
664 
665  if ($shape_type === "Marker") {
666 
667  // set marker properties
668  $tr_node->setAttribute("Type", "Marker");
669  $tr_node->setAttribute(
670  "Title",
671  $title
672  );
673  $coord_parts = explode(",", $coords);
674  $tr_node->setAttribute("MarkerX", ($coord_parts[0] ?? "0"));
675  $tr_node->setAttribute("MarkerY", ($coord_parts[1] ?? "0"));
676 
677  // remove area
678  $path = "//PageContent[@HierId = '" . $this->hier_id . "']/InteractiveImage/MediaAliasItem/MapArea[@Id='" . $nr . "']";
679  $nodes = $this->dom_util->path($this->dom_doc, $path);
680  if (count($nodes) > 0) {
681  $child = $nodes->item(0);
682  $child->parentNode->removeChild($child);
683  }
684  return;
685  }
686 
687  if ($tr_node) {
688  $tr_node->setAttribute("Type", "Area");
689  $tr_node->removeAttribute("MarkerX");
690  $tr_node->removeAttribute("MarkerY");
691 
692  $this->setMapAreaProperties(
693  $this->getStandardAliasItem(),
694  $shape_type,
695  $coords,
696  ilUtil::stripSlashes($title),
697  $nr
698  );
699  } else {
700  $this->addTriggerArea(
701  $this->getStandardAliasItem(),
702  $shape_type,
703  $coords,
704  $title
705  );
706  }
707  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
$path
Definition: ltiservices.php:29
setMapAreaProperties(ilMediaAliasItem $a_alias_item, string $a_shape_type, string $a_coords, string $a_title, string $a_id)
addTriggerArea(ilMediaAliasItem $a_alias_item, string $a_shape_type, string $a_coords, string $a_title)
Add a new trigger.
+ Here is the call graph for this function:

◆ setTriggerTitles()

ilPCInteractiveImage::setTriggerTitles ( array  $a_titles)

Set trigger titles.

Parameters
array$a_titlesarray of strings (representing the titles for the trigger)

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

References ilPageContent\getPCId(), getTriggerNodes(), and setExtLinkTitle().

566  : void {
567  $tr_nodes = $this->getTriggerNodes($this->hier_id, $this->getPCId());
568  foreach ($tr_nodes as $tr_node) {
569  if (isset($a_titles[(string) $tr_node->getAttribute("Nr")])) {
570  $tr_node->setAttribute(
571  "Title",
572  $a_titles[(string) $tr_node->getAttribute("Nr")]
573  );
574  $this->setExtLinkTitle(
575  $tr_node->getAttribute("Nr"),
576  $a_titles[(string) $tr_node->getAttribute("Nr")]
577  );
578  }
579  }
580  }
setExtLinkTitle(int $a_nr, string $a_title)
getTriggerNodes(string $a_hier_id, string $a_pc_id="")
+ Here is the call graph for this function:

Field Documentation

◆ $htmlTransform

ILIAS COPage Html TransformUtil ilPCInteractiveImage::$htmlTransform
protected

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

Referenced by modifyPageContentPostXsl().

◆ $iim_node

DOMNode ilPCInteractiveImage::$iim_node

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

◆ $lng

ilLanguage ilPCInteractiveImage::$lng
protected

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

Referenced by addContentPopup(), and addTriggerMarker().

◆ $mal_node

DOMNode ilPCInteractiveImage::$mal_node
protected

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

◆ $manager

ILIAS COPage PC InteractiveImage IIMManager ilPCInteractiveImage::$manager
protected

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

◆ $med_alias_node

DOMNode ilPCInteractiveImage::$med_alias_node
protected

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

◆ $mediaobject

ilObjMediaObject ilPCInteractiveImage::$mediaobject
protected

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

Referenced by getMediaObject().

◆ $std_alias_item

ilMediaAliasItem ilPCInteractiveImage::$std_alias_item
protected

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

Referenced by getStandardAliasItem().

◆ $thumbs

ILIAS MediaObjects Thumbs ThumbsManager ilPCInteractiveImage::$thumbs
protected

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

◆ $ui

ILIAS DI UIServices ilPCInteractiveImage::$ui
protected

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

◆ $xsl

ILIAS COPage Xsl XslManager ilPCInteractiveImage::$xsl
protected

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

◆ AREA

const ilPCInteractiveImage::AREA = "Area"

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

◆ MARKER

const ilPCInteractiveImage::MARKER = "Marker"

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


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