21 require_once(
"./components/ILIAS/MediaObjects/ImageMap/class.ilMapArea.php");
34 $media_item->setWidth(
"100");
35 $media_item->setHeight(
"50");
36 $media_object = $this->getMockBuilder(ilObjMediaObject::class)
37 ->disableOriginalConstructor()
39 $media_object->method(
"getMediaItem")
40 ->willReturnCallback(fn() => $media_item);
49 $object_adapter = $this->getMockBuilder(\
ILIAS\Repository\
Object\ObjectAdapter::class)
50 ->disableOriginalConstructor()
52 $object_adapter->method(
"getTypeForObjId")
53 ->willReturnCallback(fn() =>
"dummy");
54 return $object_adapter;
62 ilPCInteractiveImage::class,
71 $pc->create($page,
"pg");
73 '<PageObject HierId="pg"></PageObject>',
74 $page->getXMLFromDom()
83 $pc->createAlias($page,
"pg");
86 <PageObject HierId=
"pg"><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/></MediaAliasItem></InteractiveImage></PageContent></PageObject>
91 $page->getXMLFromDom()
100 $pc->createAlias($page,
"pg");
103 <PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/></MediaAliasItem></InteractiveImage></PageContent>
117 $pc->createAlias($page,
"pg");
118 $pc->addContentPopup();
124 <PageObject HierId=
"pg"><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/></MediaAliasItem><ContentPopup
Title=
"" Nr=
"1"/></InteractiveImage></PageContent></PageObject>
129 $page->getXMLFromDom()
138 $pc->createAlias($page,
"pg");
139 $pc->addContentPopup();
141 $popups = $pc->getPopups();
163 $pc->createAlias($page,
"pg");
164 $pc->addContentPopup();
166 $popups = $pc->savePopups(
168 "1_1:" =>
"Test Title" 174 "title" =>
"Test Title",
192 $pc->createAlias($page,
"pg");
193 $pc->addContentPopup();
194 $pc->addContentPopup();
196 $popups = $pc->savePopups(
198 "1_1:" =>
"Test Title 1",
199 "1_2:" =>
"Test Title 2" 202 $pc->deletePopup(
"1_1",
"");
203 $page->stripHierIDs();
206 <PageObject><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/></MediaAliasItem><ContentPopup
Title=
"Test Title 2" Nr=
"2"/></InteractiveImage></PageContent></PageObject>
211 $page->getXMLFromDom()
223 $pc->createAlias($page,
"pg");
228 $pc->setDomNode($pc->getDomNode());
238 $pc->getStandardAliasItem(),
243 $page->stripHierIDs();
247 <PageObject><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/><MapArea Shape=
"Rect" Coords=
"20,20,200,200" Id=
"1"><ExtLink Href=
"#">Area
Title</ExtLink></MapArea></MediaAliasItem><Trigger
Type=
"Area" Title=
"Area Title" Nr=
"1" OverlayX=
"0" OverlayY=
"0" PopupX=
"0" PopupY=
"0" PopupWidth=
"150" PopupHeight=
"200"/></InteractiveImage></PageContent></PageObject>
252 $page->getXMLFromDom()
261 $pc->addTriggerMarker(
263 $page->stripHierIDs();
267 <PageObject><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/></MediaAliasItem><Trigger
Type=
"Marker" Nr=
"1" OverlayX=
"0" OverlayY=
"0" MarkerX=
"0" MarkerY=
"0" PopupX=
"0" PopupY=
"0" PopupWidth=
"150" PopupHeight=
"200"/></InteractiveImage></PageContent></PageObject>
272 $page->getXMLFromDom()
280 $pc->addTriggerMarker();
282 $nodes = $pc->getTriggerNodes(
"1",
"");
285 $nodes->item(0)->nodeName
293 $pc->addTriggerMarker();
294 $triggers = $pc->getTriggers();
307 $pc->getStandardAliasItem(),
312 $ma = $pc->getStandardAliasItem();
313 $pc->deleteTrigger($ma,
"1");
315 $page->stripHierIDs();
319 <PageObject><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/></MediaAliasItem></InteractiveImage></PageContent></PageObject>
324 $page->getXMLFromDom()
334 $pc->getStandardAliasItem(),
339 $pc->setTriggerOverlays([
343 $page->stripHierIDs();
347 <PageObject><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/><MapArea Shape=
"Rect" Coords=
"20,20,200,200" Id=
"1"><ExtLink Href=
"#">Area
Title</ExtLink></MapArea></MediaAliasItem><Trigger
Type=
"Area" Title=
"Area Title" Nr=
"1" OverlayX=
"0" OverlayY=
"0" PopupX=
"0" PopupY=
"0" PopupWidth=
"150" PopupHeight=
"200" Overlay=
"image1.jpg"/></InteractiveImage></PageContent></PageObject>
352 $page->getXMLFromDom()
362 $pc->getStandardAliasItem(),
367 $pc->setTriggerOverlayPositions([
371 $page->stripHierIDs();
375 <PageObject><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/><MapArea Shape=
"Rect" Coords=
"20,20,200,200" Id=
"1"><ExtLink Href=
"#">Area
Title</ExtLink></MapArea></MediaAliasItem><Trigger
Type=
"Area" Title=
"Area Title" Nr=
"1" OverlayX=
"10" OverlayY=
"20" PopupX=
"0" PopupY=
"0" PopupWidth=
"150" PopupHeight=
"200"/></InteractiveImage></PageContent></PageObject>
380 $page->getXMLFromDom()
389 $pc->addTriggerMarker();
390 $pc->setTriggerMarkerPositions(
394 $page->stripHierIDs();
398 <PageObject><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/></MediaAliasItem><Trigger
Type=
"Marker" Nr=
"1" OverlayX=
"0" OverlayY=
"0" MarkerX=
"50" MarkerY=
"100" PopupX=
"0" PopupY=
"0" PopupWidth=
"150" PopupHeight=
"200"/></InteractiveImage></PageContent></PageObject>
403 $page->getXMLFromDom()
412 $pc->addTriggerMarker();
413 $pc->setTriggerPopupPositions(
417 $page->stripHierIDs();
421 <PageObject><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/></MediaAliasItem><Trigger
Type=
"Marker" Nr=
"1" OverlayX=
"0" OverlayY=
"0" MarkerX=
"0" MarkerY=
"0" PopupX=
"40" PopupY=
"30" PopupWidth=
"150" PopupHeight=
"200"/></InteractiveImage></PageContent></PageObject>
426 $page->getXMLFromDom()
435 $pc->addTriggerMarker();
436 $pc->setTriggerPopupSize(
440 $page->stripHierIDs();
444 <PageObject><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/></MediaAliasItem><Trigger
Type=
"Marker" Nr=
"1" OverlayX=
"0" OverlayY=
"0" MarkerX=
"0" MarkerY=
"0" PopupX=
"0" PopupY=
"0" PopupWidth=
"220" PopupHeight=
"330"/></InteractiveImage></PageContent></PageObject>
449 $page->getXMLFromDom()
458 $pc->addTriggerMarker();
459 $pc->setTriggerPopups(
463 $page->stripHierIDs();
467 <PageObject><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/></MediaAliasItem><Trigger
Type=
"Marker" Nr=
"1" OverlayX=
"0" OverlayY=
"0" MarkerX=
"0" MarkerY=
"0" PopupX=
"0" PopupY=
"0" PopupWidth=
"150" PopupHeight=
"200" PopupNr=
"1"/></InteractiveImage></PageContent></PageObject>
472 $page->getXMLFromDom()
481 $pc->addTriggerMarker();
482 $pc->setTriggerTitles(
486 $page->stripHierIDs();
490 <PageObject><PageContent><InteractiveImage><MediaAlias OriginId=
"il__mob_0"/><MediaAliasItem Purpose=
"Standard"><Layout HorizontalAlign=
"Left"/></MediaAliasItem><Trigger
Type=
"Marker" Nr=
"1" OverlayX=
"0" OverlayY=
"0" MarkerX=
"0" MarkerY=
"0" PopupX=
"0" PopupY=
"0" PopupWidth=
"150" PopupHeight=
"200" Title=
"My Title"/></InteractiveImage></PageContent></PageObject>
495 $page->getXMLFromDom()
testSetTriggerPopupPositions()
getInteractiveImageInPage(ilPageObject $page)
Interface Observer Contains several chained tasks and infos about them.
testSetTriggerOverlayPositions()
getPCIdForHierId(string $hier_id)
const IL_AREA_RECT
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
insertPCIds()
Insert Page Content IDs.
addHierIDs()
Add hierarchical ID (e.g.
testSetTriggerMarkerPositions()
testSetTriggerPopupSize()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)