ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMediaAliasItem Class Reference

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

+ Collaboration diagram for ilMediaAliasItem:

Public Member Functions

 __construct (DOMDocument $dom, string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_parent_node_name="MediaObject")
 
 getMAItemNode (string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
 
 getParameterNodes (string $a_hier_id, string $a_purpose, string $a_pc_id="")
 
 getMapAreaNodes (string $a_hier_id, string $a_purpose, string $a_pc_id="")
 
 setPcId (string $a_pcid)
 
 getPcId ()
 
 exists ()
 check if item node exists More...
 
 insert ()
 inserts new node in dom More...
 
 setWidth (string $a_width)
 
 getWidth ()
 
 definesSize ()
 check if alias item defines own size or derives size from object More...
 
 deriveSize ()
 derive size from object (-> width and height attributes are removed from layout element) More...
 
 setHeight (string $a_height)
 
 getHeight ()
 
 setCaption (string $a_caption)
 
 getCaption ()
 
 definesCaption ()
 check if alias item defines own caption or derives caption from object More...
 
 deriveCaption ()
 derive caption from object (-> caption element is removed from media alias item) More...
 
 setTextRepresentation (string $a_text_representation)
 
 getTextRepresentation ()
 
 definesTextRepresentation ()
 check if alias item defines own TextRepresentation or derives TextRepresentation from object More...
 
 deriveTextRepresentation ()
 derive TextRepresentation from object (-> TextRepresentation element is removed from media alias item) More...
 
 setHorizontalAlign (string $a_halign)
 
 getHorizontalAlign ()
 
 setParameters (array $a_par_array)
 
 getParameterString ()
 Get all parameters as string. More...
 
 getParameters ()
 Get all parameters as array. More...
 
 definesParameters ()
 check if alias item defines own parameters or derives parameters from object More...
 
 deriveParameters ()
 derive parameters from object (-> all parameter elements are removed from media alias item) More...
 
 getMapAreas ()
 Get all map areas. More...
 
 setAreaTitle (int $a_nr, string $a_title)
 
 setAreaIntLink (int $a_nr, string $a_type, string $a_target, string $a_target_frame)
 Set link of area to an internal one. More...
 
 setAreaExtLink (int $a_nr, string $a_href)
 Set link of area to an external one. More...
 
 setShape (int $a_nr, string $a_shape_type, string $a_coords)
 Set shape and coords of single area. More...
 
 setAreaHighlightMode (int $a_nr, string $a_mode)
 Set highlight mode single area. More...
 
 setAreaHighlightClass (int $a_nr, string $a_class)
 Set highlight class single area. More...
 
 addMapArea (string $a_shape_type, string $a_coords, string $a_title, array $a_link, string $a_id="")
 Add a new area to the map. More...
 
 deleteMapArea (int $a_nr)
 Delete a sinlge map area. More...
 
 deleteMapAreaById (string $a_id)
 Delete map areas by id. More...
 
 deleteAllMapAreas ()
 Delete all map areas. More...
 
 getLinkTypeOfArea (int $a_nr)
 Get link type. More...
 
 getTypeOfArea (int $a_nr)
 Get type (only internal link) More...
 
 getTargetOfArea (int $a_nr)
 Get target (only internal link) More...
 
 getTargetFrameOfArea (int $a_nr)
 Get target frame (only internal link) More...
 
 getHrefOfArea (int $a_nr)
 Get href (only external link) More...
 
 getTitleOfArea (int $a_nr)
 Get title. More...
 
 delete ()
 delete full item node from dom More...
 
 makeMapWorkCopy (ilMediaItem $a_st_item, int $a_area_nr, bool $a_exclude, bool $a_output_new_area, string $a_area_type, string $a_coords)
 make map work copy of image More...
 
 hasAnyPropertiesSet ()
 Has the alias any properties set? More...
 
 getModel ()
 

Data Fields

string $hier_id = ""
 
string $purpose = ""
 
DOMNode $item_node = null
 

Protected Member Functions

 getItemNode ()
 

Protected Attributes

DOMDocument $dom_doc
 
ILIAS COPage Dom DomUtil $dom_util
 
string $parent_node_name
 
string $pcid
 
ilLanguage $lng
 

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 Class ilMediaAliasItem Media Alias Item, component of a media object (file or reference)

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

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

Constructor & Destructor Documentation

◆ __construct()

ilMediaAliasItem::__construct ( DOMDocument  $dom,
string  $a_hier_id,
string  $a_purpose,
string  $a_pc_id = "",
string  $a_parent_node_name = "MediaObject" 
)

Definition at line 35 of file class.ilMediaAliasItem.php.

References $DIC, getMAItemNode(), getPcId(), ILIAS\Repository\lng(), and setPcId().

41  {
42  global $DIC;
43 
44  $this->lng = $DIC->language();
45  $this->dom_doc = $dom;
46  $this->parent_node_name = $a_parent_node_name;
47  $this->hier_id = $a_hier_id;
48  $this->purpose = $a_purpose;
49  $this->setPcId($a_pc_id);
50  $this->dom_util = $DIC->copage()->internal()->domain()->domUtil();
51  $this->item_node = $this->getMAItemNode(
52  $this->hier_id,
53  $this->purpose,
54  $this->getPcId()
55  );
56  }
global $DIC
Definition: shib_login.php:22
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:

Member Function Documentation

◆ addMapArea()

ilMediaAliasItem::addMapArea ( string  $a_shape_type,
string  $a_coords,
string  $a_title,
array  $a_link,
string  $a_id = "" 
)

Add a new area to the map.

Definition at line 658 of file class.ilMediaAliasItem.php.

References getItemNode().

Referenced by ilPCInteractiveImage\setMapAreaProperties(), PCMediaObjectTest\testAddMapArea(), PCMediaObjectTest\testAreaProps(), PCMediaObjectTest\testDeleteAllMapAreas(), PCMediaObjectTest\testDeleteMapArea(), and PCMediaObjectTest\testDeleteMapAreaById().

664  : void {
665  $attributes = array("Shape" => $a_shape_type,
666  "Coords" => $a_coords, "Id" => $a_id);
667 
668  $ma_node = $this->dom_util->addElementToList(
669  $this->getItemNode(),
670  "MapArea",
671  array(),
672  "",
673  $attributes
674  );
675 
676  if ($a_link["LinkType"] == "int" || $a_link["LinkType"] == "IntLink") {
677  $attributes = array("Type" => $a_link["Type"],
678  "TargetFrame" => $a_link["TargetFrame"],
679  "Target" => $a_link["Target"]);
680  $this->dom_util->setFirstOptionalElement(
681  $ma_node,
682  "IntLink",
683  array(""),
684  $a_title,
685  $attributes
686  );
687  }
688  if ($a_link["LinkType"] == "ext" || $a_link["LinkType"] == "ExtLink") {
689  $attributes = array("Href" => $a_link["Href"]);
690  $this->dom_util->setFirstOptionalElement(
691  $ma_node,
692  "ExtLink",
693  array(""),
694  $a_title,
695  $attributes
696  );
697  }
698  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ definesCaption()

ilMediaAliasItem::definesCaption ( )

check if alias item defines own caption or derives caption from object

Returns
bool returns true if caption is not derived from object

Definition at line 273 of file class.ilMediaAliasItem.php.

References getMAItemNode(), and getPcId().

Referenced by hasAnyPropertiesSet(), PCMediaObjectTest\testCaption(), and PCMediaObjectTest\testDeriveCaption().

273  : bool
274  {
275  $caption_node = $this->getMAItemNode(
276  $this->hier_id,
277  $this->purpose,
278  $this->getPcId(),
279  "/Caption"
280  );
281  if (is_object($caption_node)) {
282  return true;
283  }
284  return false;
285  }
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ definesParameters()

ilMediaAliasItem::definesParameters ( )

check if alias item defines own parameters or derives parameters from object

Returns
bool returns true if parameters are not derived from object

Definition at line 458 of file class.ilMediaAliasItem.php.

References getParameterNodes(), and getPcId().

Referenced by hasAnyPropertiesSet(), PCMediaObjectTest\testDeriveParameters(), and PCMediaObjectTest\testParameters().

458  : bool
459  {
460  $par_nodes = $this->getParameterNodes(
461  $this->hier_id,
462  $this->purpose,
463  $this->getPcId()
464  );
465  if (count($par_nodes) > 0) {
466  return true;
467  }
468  return false;
469  }
getParameterNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ definesSize()

ilMediaAliasItem::definesSize ( )

check if alias item defines own size or derives size from object

Returns
bool returns true if size is not derived from object

Definition at line 182 of file class.ilMediaAliasItem.php.

References getMAItemNode(), and getPcId().

Referenced by hasAnyPropertiesSet(), PCMediaObjectTest\testDeriveSize(), and PCMediaObjectTest\testWidth().

182  : bool
183  {
184  $layout_node = $this->getMAItemNode(
185  $this->hier_id,
186  $this->purpose,
187  $this->getPcId(),
188  "/Layout"
189  );
190  if (is_object($layout_node)) {
191  return $layout_node->hasAttribute("Width");
192  }
193  return false;
194  }
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ definesTextRepresentation()

ilMediaAliasItem::definesTextRepresentation ( )

check if alias item defines own TextRepresentation or derives TextRepresentation from object

Returns
bool returns true if TextRepresentation is not derived from object

Definition at line 333 of file class.ilMediaAliasItem.php.

References getMAItemNode(), and getPcId().

Referenced by hasAnyPropertiesSet(), PCMediaObjectTest\testDeriveTextRepresentation(), and PCMediaObjectTest\testTextRepresentation().

333  : bool
334  {
335  $text_representation_node = $this->getMAItemNode(
336  $this->hier_id,
337  $this->purpose,
338  $this->getPcId(),
339  "/TextRepresentation"
340  );
341  if (is_object($text_representation_node)) {
342  return true;
343  }
344  return false;
345  }
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilMediaAliasItem::delete ( )

delete full item node from dom

Definition at line 857 of file class.ilMediaAliasItem.php.

857  : void
858  {
859  if (is_object($this->item_node)) {
860  $this->item_node->parentNode->removeChild($this->item_node);
861  }
862  }

◆ deleteAllMapAreas()

ilMediaAliasItem::deleteAllMapAreas ( )

Delete all map areas.

Definition at line 738 of file class.ilMediaAliasItem.php.

References $path.

Referenced by PCMediaObjectTest\testDeleteAllMapAreas().

738  : void
739  {
740  $path = "//PageContent[@HierId = '" . $this->hier_id . "']/" . $this->parent_node_name . "/MediaAliasItem[@Purpose='" . $this->purpose . "']/MapArea";
741  $nodes = $this->dom_util->path($this->dom_doc, $path);
742  foreach ($nodes as $node) {
743  $node->parentNode->removeChild($node);
744  }
745  }
$path
Definition: ltiservices.php:29
+ Here is the caller graph for this function:

◆ deleteMapArea()

ilMediaAliasItem::deleteMapArea ( int  $a_nr)

Delete a sinlge map area.

Definition at line 703 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

Referenced by PCMediaObjectTest\testDeleteMapArea().

703  : void
704  {
705  $ma_nodes = $this->getMapAreaNodes(
706  $this->hier_id,
707  $this->purpose,
708  $this->getPcId()
709  );
710 
711  if (is_object($ma_nodes->item($a_nr - 1))) {
712  $node = $ma_nodes->item($a_nr - 1);
713  $node->parentNode->removeChild($node);
714  }
715  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteMapAreaById()

ilMediaAliasItem::deleteMapAreaById ( string  $a_id)

Delete map areas by id.

Definition at line 720 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

Referenced by ilPCInteractiveImage\deleteTrigger(), ilPCInteractiveImage\setMapAreaProperties(), and PCMediaObjectTest\testDeleteMapAreaById().

722  : void {
723  $ma_nodes = $this->getMapAreaNodes(
724  $this->hier_id,
725  $this->purpose,
726  $this->getPcId()
727  );
728  foreach ($ma_nodes as $node) {
729  if ($node->getAttribute("Id") == $a_id) {
730  $node->parentNode->removeChild($node);
731  }
732  }
733  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deriveCaption()

ilMediaAliasItem::deriveCaption ( )

derive caption from object (-> caption element is removed from media alias item)

Definition at line 290 of file class.ilMediaAliasItem.php.

References getMAItemNode(), and getPcId().

Referenced by PCMediaObjectTest\testDeriveCaption().

290  : void
291  {
292  $caption_node = $this->getMAItemNode(
293  $this->hier_id,
294  $this->purpose,
295  $this->getPcId(),
296  "/Caption"
297  );
298  if (is_object($caption_node)) {
299  $caption_node->parentNode->removeChild($caption_node);
300  }
301  }
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deriveParameters()

ilMediaAliasItem::deriveParameters ( )

derive parameters from object (-> all parameter elements are removed from media alias item)

Definition at line 474 of file class.ilMediaAliasItem.php.

References getParameterNodes(), and getPcId().

Referenced by PCMediaObjectTest\testDeriveParameters().

474  : void
475  {
476  $par_nodes = $this->getParameterNodes(
477  $this->hier_id,
478  $this->purpose,
479  $this->getPcId()
480  );
481  foreach ($par_nodes as $par_node) {
482  $par_node->parentNode->removeChild($par_node);
483  }
484  }
getParameterNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deriveSize()

ilMediaAliasItem::deriveSize ( )

derive size from object (-> width and height attributes are removed from layout element)

Definition at line 199 of file class.ilMediaAliasItem.php.

References getMAItemNode(), and getPcId().

Referenced by PCMediaObjectTest\testDeriveSize().

199  : void
200  {
201  $layout_node = $this->getMAItemNode(
202  $this->hier_id,
203  $this->purpose,
204  $this->getPcId(),
205  "/Layout"
206  );
207  if (is_object($layout_node)) {
208  if ($layout_node->hasAttribute("Width")) {
209  $layout_node->removeAttribute("Width");
210  }
211  if ($layout_node->hasAttribute("Height")) {
212  $layout_node->removeAttribute("Height");
213  }
214  }
215  }
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deriveTextRepresentation()

ilMediaAliasItem::deriveTextRepresentation ( )

derive TextRepresentation from object (-> TextRepresentation element is removed from media alias item)

Definition at line 350 of file class.ilMediaAliasItem.php.

References getMAItemNode(), and getPcId().

Referenced by PCMediaObjectTest\testDeriveTextRepresentation().

350  : void
351  {
352  $text_representation_node = $this->getMAItemNode(
353  $this->hier_id,
354  $this->purpose,
355  $this->getPcId(),
356  "/TextRepresentation"
357  );
358  if (is_object($text_representation_node)) {
359  $text_representation_node->parentNode->removeChild($text_representation_node);
360  }
361  }
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exists()

ilMediaAliasItem::exists ( )

check if item node exists

Definition at line 126 of file class.ilMediaAliasItem.php.

126  : bool
127  {
128  if (is_object($this->item_node)) {
129  return true;
130  } else {
131  return false;
132  }
133  }

◆ getCaption()

ilMediaAliasItem::getCaption ( )

Definition at line 255 of file class.ilMediaAliasItem.php.

References getMAItemNode(), and getPcId().

Referenced by getModel(), and PCMediaObjectTest\testCaption().

255  : string
256  {
257  $caption_node = $this->getMAItemNode(
258  $this->hier_id,
259  $this->purpose,
260  $this->getPcId(),
261  "/Caption"
262  );
263  if (is_object($caption_node)) {
264  return $this->dom_util->getContent($caption_node);
265  }
266  return "";
267  }
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHeight()

ilMediaAliasItem::getHeight ( )

Definition at line 230 of file class.ilMediaAliasItem.php.

References getMAItemNode(), and getPcId().

Referenced by makeMapWorkCopy(), and PCMediaObjectTest\testHeight().

230  : string
231  {
232  $layout_node = $this->getMAItemNode(
233  $this->hier_id,
234  $this->purpose,
235  $this->getPcId(),
236  "/Layout"
237  );
238  if (is_object($layout_node)) {
239  return $layout_node->getAttribute("Height");
240  }
241  return "";
242  }
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHorizontalAlign()

ilMediaAliasItem::getHorizontalAlign ( )

Definition at line 376 of file class.ilMediaAliasItem.php.

References getMAItemNode(), and getPcId().

Referenced by PCMediaObjectTest\testHorizontalAlign().

376  : string
377  {
378  $layout_node = $this->getMAItemNode(
379  $this->hier_id,
380  $this->purpose,
381  $this->getPcId(),
382  "/Layout"
383  );
384  if (is_object($layout_node)) {
385  return $layout_node->getAttribute("HorizontalAlign");
386  }
387  return "";
388  }
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHrefOfArea()

ilMediaAliasItem::getHrefOfArea ( int  $a_nr)

Get href (only external link)

Definition at line 823 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

Referenced by PCMediaObjectTest\testAddMapArea().

823  : string
824  {
825  $ma_nodes = $this->getMapAreaNodes(
826  $this->hier_id,
827  $this->purpose,
828  $this->getPcId()
829  );
830  if (is_object($ma_nodes->item($a_nr - 1))) {
831  $childs = $ma_nodes->item($a_nr - 1)->childNodes;
832  return $childs->item(0)->getAttribute("Href");
833  }
834  return "";
835  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getItemNode()

ilMediaAliasItem::getItemNode ( )
protected

Definition at line 58 of file class.ilMediaAliasItem.php.

References $item_node.

Referenced by addMapArea(), setCaption(), setHeight(), setHorizontalAlign(), setParameters(), setTextRepresentation(), and setWidth().

58  : DOMNode
59  {
60  return $this->item_node;
61  }
+ Here is the caller graph for this function:

◆ getLinkTypeOfArea()

ilMediaAliasItem::getLinkTypeOfArea ( int  $a_nr)

Get link type.

Definition at line 750 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

Referenced by PCMediaObjectTest\testAreaProps().

750  : string
751  {
752  $ma_nodes = $this->getMapAreaNodes(
753  $this->hier_id,
754  $this->purpose,
755  $this->getPcId()
756  );
757  if (is_object($ma_nodes->item($a_nr - 1))) {
758  $childs = $ma_nodes->item($a_nr - 1)->childNodes;
759  if ($childs->item(0)->nodeName == "IntLink") {
760  return "int";
761  }
762  if ($childs->item(0)->nodeName == "ExtLink") {
763  return "ext";
764  }
765  }
766  return "";
767  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMAItemNode()

ilMediaAliasItem::getMAItemNode ( string  $a_hier_id,
string  $a_purpose,
string  $a_pc_id = "",
string  $a_sub_element = "" 
)

Definition at line 63 of file class.ilMediaAliasItem.php.

References $path, and null.

Referenced by __construct(), definesCaption(), definesSize(), definesTextRepresentation(), deriveCaption(), deriveSize(), deriveTextRepresentation(), getCaption(), getHeight(), getHorizontalAlign(), getTextRepresentation(), and getWidth().

68  : ?DOMNode {
69  if ($a_pc_id != "") {
70  $path = "//PageContent[@PCID = '" . $a_pc_id . "']/" . $this->parent_node_name . "/MediaAliasItem[@Purpose='$a_purpose']" . $a_sub_element;
71  $nodes = $this->dom_util->path($this->dom_doc, $path);
72  if (count($nodes) == 1) {
73  return $nodes->item(0);
74  }
75  }
76 
77  $path = "//PageContent[@HierId = '" . $a_hier_id . "']/" . $this->parent_node_name . "/MediaAliasItem[@Purpose='$a_purpose']" . $a_sub_element;
78  $nodes = $this->dom_util->path($this->dom_doc, $path);
79  if (count($nodes) > 0) {
80  return $nodes->item(0);
81  }
82  return null;
83  }
$path
Definition: ltiservices.php:29
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getMapAreaNodes()

ilMediaAliasItem::getMapAreaNodes ( string  $a_hier_id,
string  $a_purpose,
string  $a_pc_id = "" 
)

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

References $path.

Referenced by deleteMapArea(), deleteMapAreaById(), getHrefOfArea(), getLinkTypeOfArea(), getMapAreas(), getTargetFrameOfArea(), getTargetOfArea(), getTitleOfArea(), getTypeOfArea(), setAreaExtLink(), setAreaHighlightClass(), setAreaHighlightMode(), setAreaIntLink(), setAreaTitle(), and setShape().

103  : DOMNodeList {
104  if ($a_pc_id != "") {
105  $path = "//PageContent[@PCID = '" . $a_pc_id . "']/" . $this->parent_node_name . "/MediaAliasItem[@Purpose='$a_purpose']/MapArea";
106  return $this->dom_util->path($this->dom_doc, $path);
107  }
108 
109  $path = "//PageContent[@HierId = '" . $a_hier_id . "']/" . $this->parent_node_name . "/MediaAliasItem[@Purpose='$a_purpose']/MapArea";
110  return $this->dom_util->path($this->dom_doc, $path);
111  }
$path
Definition: ltiservices.php:29
+ Here is the caller graph for this function:

◆ getMapAreas()

ilMediaAliasItem::getMapAreas ( )

Get all map areas.

Definition at line 490 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

Referenced by ilPCImageMapTableGUI\getItems(), getModel(), makeMapWorkCopy(), and PCMediaObjectTest\testAddMapArea().

490  : array
491  {
492  $ma_nodes = $this->getMapAreaNodes(
493  $this->hier_id,
494  $this->purpose,
495  $this->getPcId()
496  );
497  $maparea_arr = array();
498  $i = 0;
499  foreach ($ma_nodes as $maparea_node) {
500  $childs = $maparea_node->childNodes;
501  $link = array();
502  $first = $childs->item(0);
503  if ($first->nodeName == "ExtLink") {
504  $link = array("LinkType" => "ExtLink",
505  "Href" => $first->getAttribute("Href"),
506  "Title" => $this->dom_util->getContent($first));
507  }
508  if ($first->nodeName == "IntLink") {
509  $link = array("LinkType" => "IntLink",
510  "Target" => $first->getAttribute("Target"),
511  "Type" => $first->getAttribute("Type"),
512  "TargetFrame" => $first->getAttribute("TargetFame"),
513  "Title" => $this->dom_util->getContent($first));
514  }
515  $maparea_arr[] = array(
516  "Nr" => $i + 1,
517  "Shape" => $maparea_node->getAttribute("Shape"),
518  "Coords" => $maparea_node->getAttribute("Coords"),
519  "HighlightMode" => $maparea_node->getAttribute("HighlightMode"),
520  "HighlightClass" => $maparea_node->getAttribute("HighlightClass"),
521  "Id" => $maparea_node->getAttribute("Id"),
522  "Link" => $link);
523  $i++;
524  }
525 
526  return $maparea_arr;
527  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getModel()

ilMediaAliasItem::getModel ( )

Definition at line 947 of file class.ilMediaAliasItem.php.

References getCaption(), and getMapAreas().

947  : ?stdClass
948  {
949  $model = new \stdClass();
950  $model->areas = $this->getMapAreas();
951  $model->caption = $this->getCaption();
952  return $model;
953  }
getMapAreas()
Get all map areas.
+ Here is the call graph for this function:

◆ getParameterNodes()

ilMediaAliasItem::getParameterNodes ( string  $a_hier_id,
string  $a_purpose,
string  $a_pc_id = "" 
)

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

References $path.

Referenced by definesParameters(), deriveParameters(), getParameters(), getParameterString(), and setParameters().

89  : DOMNodeList {
90  if ($a_pc_id != "") {
91  $path = "//PageContent[@PCID = '" . $a_pc_id . "']/" . $this->parent_node_name . "/MediaAliasItem[@Purpose='$a_purpose']/Parameter";
92  return $this->dom_util->path($this->dom_doc, $path);
93  }
94 
95  $path = "//PageContent[@HierId = '" . $a_hier_id . "']/" . $this->parent_node_name . "/MediaAliasItem[@Purpose='$a_purpose']/Parameter";
96  return $this->dom_util->path($this->dom_doc, $path);
97  }
$path
Definition: ltiservices.php:29
+ Here is the caller graph for this function:

◆ getParameters()

ilMediaAliasItem::getParameters ( )

Get all parameters as array.

Definition at line 438 of file class.ilMediaAliasItem.php.

References getParameterNodes(), and getPcId().

Referenced by PCMediaObjectTest\testParameters().

438  : array
439  {
440  $par_nodes = $this->getParameterNodes(
441  $this->hier_id,
442  $this->purpose,
443  $this->getPcId()
444  );
445  $par_arr = array();
446  for ($i = 0; $i < count($par_nodes); $i++) {
447  $par_node = $par_nodes[$i];
448  $par_arr[$par_node->getAttribute("Name")] =
449  $par_node->getAttribute("Value");
450  }
451  return $par_arr;
452  }
getParameterNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getParameterString()

ilMediaAliasItem::getParameterString ( )

Get all parameters as string.

Definition at line 421 of file class.ilMediaAliasItem.php.

References getParameterNodes(), and getPcId().

Referenced by PCMediaObjectTest\testParameters().

421  : string
422  {
423  $par_nodes = $this->getParameterNodes(
424  $this->hier_id,
425  $this->purpose,
426  $this->getPcId()
427  );
428  $par_arr = array();
429  foreach ($par_nodes as $par_node) {
430  $par_arr[] = $par_node->getAttribute("Name") . "=\"" . $par_node->getAttribute("Value") . "\"";
431  }
432  return implode(", ", $par_arr);
433  }
getParameterNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPcId()

◆ getTargetFrameOfArea()

ilMediaAliasItem::getTargetFrameOfArea ( int  $a_nr)

Get target frame (only internal link)

Definition at line 806 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

Referenced by PCMediaObjectTest\testAreaProps().

806  : string
807  {
808  $ma_nodes = $this->getMapAreaNodes(
809  $this->hier_id,
810  $this->purpose,
811  $this->getPcId()
812  );
813  if (is_object($ma_nodes->item($a_nr - 1))) {
814  $childs = $ma_nodes->item($a_nr - 1)->childNodes;
815  return $childs->item(0)->getAttribute("TargetFrame");
816  }
817  return "";
818  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTargetOfArea()

ilMediaAliasItem::getTargetOfArea ( int  $a_nr)

Get target (only internal link)

Definition at line 789 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

Referenced by PCMediaObjectTest\testAreaProps().

789  : string
790  {
791  $ma_nodes = $this->getMapAreaNodes(
792  $this->hier_id,
793  $this->purpose,
794  $this->getPcId()
795  );
796  if (is_object($ma_nodes->item($a_nr - 1))) {
797  $childs = $ma_nodes->item($a_nr - 1)->childNodes;
798  return $childs->item(0)->getAttribute("Target");
799  }
800  return "";
801  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTextRepresentation()

ilMediaAliasItem::getTextRepresentation ( )

Definition at line 315 of file class.ilMediaAliasItem.php.

References getMAItemNode(), and getPcId().

Referenced by PCMediaObjectTest\testTextRepresentation().

315  : string
316  {
317  $text_representation_node = $this->getMAItemNode(
318  $this->hier_id,
319  $this->purpose,
320  $this->getPcId(),
321  "/TextRepresentation"
322  );
323  if (is_object($text_representation_node)) {
324  return $this->dom_util->getContent($text_representation_node);
325  }
326  return "";
327  }
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTitleOfArea()

ilMediaAliasItem::getTitleOfArea ( int  $a_nr)

Get title.

Definition at line 840 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

Referenced by setAreaExtLink(), setAreaIntLink(), and PCMediaObjectTest\testAreaProps().

840  : string
841  {
842  $ma_nodes = $this->getMapAreaNodes(
843  $this->hier_id,
844  $this->purpose,
845  $this->getPcId()
846  );
847  if (is_object($ma_nodes->item($a_nr - 1))) {
848  $childs = $ma_nodes->item($a_nr - 1)->childNodes;
849  return $this->dom_util->getContent($childs->item(0));
850  }
851  return "";
852  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTypeOfArea()

ilMediaAliasItem::getTypeOfArea ( int  $a_nr)

Get type (only internal link)

Definition at line 772 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

Referenced by PCMediaObjectTest\testAreaProps().

772  : string
773  {
774  $ma_nodes = $this->getMapAreaNodes(
775  $this->hier_id,
776  $this->purpose,
777  $this->getPcId()
778  );
779  if (is_object($ma_nodes->item($a_nr - 1))) {
780  $childs = $ma_nodes->item($a_nr - 1)->childNodes;
781  return $childs->item(0)->getAttribute("Type");
782  }
783  return "";
784  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getWidth()

ilMediaAliasItem::getWidth ( )

Definition at line 164 of file class.ilMediaAliasItem.php.

References getMAItemNode(), and getPcId().

Referenced by makeMapWorkCopy(), and PCMediaObjectTest\testWidth().

164  : string
165  {
166  $layout_node = $this->getMAItemNode(
167  $this->hier_id,
168  $this->purpose,
169  $this->getPcId(),
170  "/Layout"
171  );
172  if (is_object($layout_node)) {
173  return $layout_node->getAttribute("Width");
174  }
175  return "";
176  }
getMAItemNode(string $a_hier_id, string $a_purpose, string $a_pc_id="", string $a_sub_element="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasAnyPropertiesSet()

ilMediaAliasItem::hasAnyPropertiesSet ( )

Has the alias any properties set?

Definition at line 939 of file class.ilMediaAliasItem.php.

References definesCaption(), definesParameters(), definesSize(), and definesTextRepresentation().

939  : bool
940  {
941  return ($this->definesSize() ||
942  $this->definesCaption() ||
943  $this->definesTextRepresentation() ||
944  $this->definesParameters());
945  }
definesTextRepresentation()
check if alias item defines own TextRepresentation or derives TextRepresentation from object ...
definesCaption()
check if alias item defines own caption or derives caption from object
definesSize()
check if alias item defines own size or derives size from object
definesParameters()
check if alias item defines own parameters or derives parameters from object
+ Here is the call graph for this function:

◆ insert()

ilMediaAliasItem::insert ( )

inserts new node in dom

Definition at line 138 of file class.ilMediaAliasItem.php.

References $item_node, $parent_node_name, and $path.

138  : void
139  {
140  $path = "//PageContent[@HierId = '" . $this->hier_id . "']/" . $this->parent_node_name;
141  $nodes = $this->dom_util->path($this->dom_doc, $path);
142  if (count($nodes) > 0) {
143  $obj_node = $nodes->item(0);
144  $item_node = $this->dom_doc->createElement("MediaAliasItem");
145  $item_node = $obj_node->appendChild($item_node);
146  $item_node->setAttribute("Purpose", $this->purpose);
147  $this->item_node = $item_node;
148  }
149  }
$path
Definition: ltiservices.php:29

◆ makeMapWorkCopy()

ilMediaAliasItem::makeMapWorkCopy ( ilMediaItem  $a_st_item,
int  $a_area_nr,
bool  $a_exclude,
bool  $a_output_new_area,
string  $a_area_type,
string  $a_coords 
)

make map work copy of image

Parameters
int$a_area_nrdraw area $a_area_nr only
bool$a_excludetrue: draw all areas but area $a_area_nr

Definition at line 869 of file class.ilMediaAliasItem.php.

References ilMediaItem\buildMapWorkImage(), getHeight(), ilMediaItem\getHeight(), getMapAreas(), ilMediaItem\getMapWorkImage(), ilMediaItem\getOriginalSource(), getWidth(), and ilMediaItem\getWidth().

Referenced by ilPCImageMapEditorGUI\makeMapWorkCopy().

876  : bool {
877  $a_st_item->buildMapWorkImage();
878 
879  // determine ratios (first see whether the instance has w/h defined)
880  $width = $this->getWidth();
881  $height = $this->getHeight();
882 
883  // if instance has no size, use object w/h
884  if ($width == 0 && $height == 0) {
885  $width = $a_st_item->getWidth();
886  $height = $a_st_item->getHeight();
887  }
888  $size = getimagesize($a_st_item->getOriginalSource());
889  $x_ratio = 1;
890  if ($size[0] > 0 && $width > 0) {
891  $x_ratio = $width / $size[0];
892  }
893  $y_ratio = 1;
894  if ($size[1] > 0 && $height > 0) {
895  $y_ratio = $height / $size[1];
896  }
897 
898  // draw map areas
899  $areas = $this->getMapAreas();
900  for ($i = 0; $i < count($areas); $i++) {
901  if (((($i + 1) == $a_area_nr) && !$a_exclude) ||
902  ((($i + 1) != $a_area_nr) && $a_exclude) ||
903  ($a_area_nr == 0)
904  ) {
905  $area = new ilMapArea();
906  $area->setShape($areas[$i]["Shape"]);
907  $area->setCoords($areas[$i]["Coords"]);
908  $area->draw(
909  $a_st_item->getMapWorkImage(),
910  $a_st_item->color1,
911  $a_st_item->color2,
912  true,
913  $x_ratio,
914  $y_ratio
915  );
916  }
917  }
918 
919  if ($a_output_new_area) {
920  $area = new ilMapArea();
921  $area->setShape($a_area_type);
922  $area->setCoords($a_coords);
923  $area->draw(
924  $a_st_item->getMapWorkImage(),
925  $a_st_item->color1,
926  $a_st_item->color2,
927  false,
928  $x_ratio,
929  $y_ratio
930  );
931  }
932 
933  return true;
934  }
buildMapWorkImage()
build image map work image
Class ilMapArea.
getMapAreas()
Get all map areas.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAreaExtLink()

ilMediaAliasItem::setAreaExtLink ( int  $a_nr,
string  $a_href 
)

Set link of area to an external one.

Definition at line 579 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), getPcId(), and getTitleOfArea().

582  : void {
583  $ma_nodes = $this->getMapAreaNodes(
584  $this->hier_id,
585  $this->purpose,
586  $this->getPcId()
587  );
588  if (is_object($ma_nodes[$a_nr - 1])) {
589  $title = $this->getTitleOfArea($a_nr);
590  $this->dom_util->deleteAllChildsByName($ma_nodes[$a_nr - 1]->myDOMNode, array("IntLink", "ExtLink"));
591  $attributes = array("Href" => $a_href);
592  $this->dom_util->setFirstOptionalElement(
593  $ma_nodes[$a_nr - 1]->myDOMNode,
594  "ExtLink",
595  array(""),
596  $title,
597  $attributes
598  );
599  }
600  }
getTitleOfArea(int $a_nr)
Get title.
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setAreaHighlightClass()

ilMediaAliasItem::setAreaHighlightClass ( int  $a_nr,
string  $a_class 
)

Set highlight class single area.

Definition at line 641 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

644  : void {
645  $ma_nodes = $this->getMapAreaNodes(
646  $this->hier_id,
647  $this->purpose,
648  $this->getPcId()
649  );
650  if (is_object($ma_nodes[$a_nr - 1])) {
651  $ma_nodes[$a_nr - 1]->set_attribute("HighlightClass", $a_class);
652  }
653  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setAreaHighlightMode()

ilMediaAliasItem::setAreaHighlightMode ( int  $a_nr,
string  $a_mode 
)

Set highlight mode single area.

Definition at line 624 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

627  : void {
628  $ma_nodes = $this->getMapAreaNodes(
629  $this->hier_id,
630  $this->purpose,
631  $this->getPcId()
632  );
633  if (is_object($ma_nodes[$a_nr - 1])) {
634  $ma_nodes[$a_nr - 1]->set_attribute("HighlightMode", $a_mode);
635  }
636  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setAreaIntLink()

ilMediaAliasItem::setAreaIntLink ( int  $a_nr,
string  $a_type,
string  $a_target,
string  $a_target_frame 
)

Set link of area to an internal one.

Definition at line 550 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), getPcId(), and getTitleOfArea().

555  : void {
556  $ma_nodes = $this->getMapAreaNodes(
557  $this->hier_id,
558  $this->purpose,
559  $this->getPcId()
560  );
561  if (is_object($ma_nodes[$a_nr - 1])) {
562  $title = $this->getTitleOfArea($a_nr);
563  $this->dom_util->deleteAllChildsByName($ma_nodes[$a_nr - 1], array("IntLink", "ExtLink"));
564  $attributes = array("Type" => $a_type, "Target" => $a_target,
565  "TargetFrame" => $a_target_frame);
566  $this->dom_util->setFirstOptionalElement(
567  $ma_nodes[$a_nr - 1],
568  "IntLink",
569  array(""),
570  $title,
571  $attributes
572  );
573  }
574  }
getTitleOfArea(int $a_nr)
Get title.
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setAreaTitle()

ilMediaAliasItem::setAreaTitle ( int  $a_nr,
string  $a_title 
)

Definition at line 529 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

532  : void {
533  $ma_nodes = $this->getMapAreaNodes(
534  $this->hier_id,
535  $this->purpose,
536  $this->getPcId()
537  );
538  if (is_object($ma_nodes[$a_nr - 1])) {
539  $childs = $ma_nodes[$a_nr - 1]->child_nodes();
540  if (is_object($childs[0]) &&
541  ($childs[0]->node_name() == "IntLink" || $childs[0]->node_name() == "ExtLink")) {
542  $childs[0]->set_content($a_title);
543  }
544  }
545  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setCaption()

ilMediaAliasItem::setCaption ( string  $a_caption)

Definition at line 244 of file class.ilMediaAliasItem.php.

References getItemNode().

Referenced by PCMediaObjectTest\testCaption(), PCMediaObjectTest\testDeriveCaption(), and ilPCInteractiveImageGUI\update().

244  : void
245  {
246  $this->dom_util->setFirstOptionalElement(
247  $this->getItemNode(),
248  "Caption",
249  array("TextRepresentation", "Parameter", "MapArea"),
250  $a_caption,
251  array("Align" => "bottom")
252  );
253  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHeight()

ilMediaAliasItem::setHeight ( string  $a_height)

Definition at line 217 of file class.ilMediaAliasItem.php.

References getItemNode().

Referenced by PCMediaObjectTest\testDeriveSize(), and PCMediaObjectTest\testHeight().

217  : void
218  {
219  $this->dom_util->setFirstOptionalElement(
220  $this->getItemNode(),
221  "Layout",
222  array("Caption", "TextRepresentation", "Parameter", "MapArea"),
223  "",
224  array("Height" => $a_height),
225  false
226  );
227  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHorizontalAlign()

ilMediaAliasItem::setHorizontalAlign ( string  $a_halign)

Definition at line 363 of file class.ilMediaAliasItem.php.

References getItemNode().

Referenced by ilPCInteractiveImageGUI\centerAlign(), ilPCInteractiveImageGUI\leftAlign(), ilPCInteractiveImageGUI\leftFloatAlign(), ilPCInteractiveImageGUI\rightAlign(), ilPCInteractiveImageGUI\rightFloatAlign(), and PCMediaObjectTest\testHorizontalAlign().

363  : void
364  {
365  $this->dom_util->setFirstOptionalElement(
366  $this->getItemNode(),
367  "Layout",
368  array("Caption", "TextRepresentation", "Parameter", "MapArea"),
369  "",
370  array("HorizontalAlign" => $a_halign),
371  false
372  );
373  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setParameters()

ilMediaAliasItem::setParameters ( array  $a_par_array)

Definition at line 390 of file class.ilMediaAliasItem.php.

References ilMediaItem\checkParameter(), getItemNode(), getParameterNodes(), and getPcId().

Referenced by PCMediaObjectTest\testDeriveParameters(), and PCMediaObjectTest\testParameters().

390  : void
391  {
392  $par_nodes = $this->getParameterNodes(
393  $this->hier_id,
394  $this->purpose,
395  $this->getPcId()
396  );
397  for ($i = 0; $i < count($par_nodes); $i++) {
398  $par_node = $par_nodes[$i];
399  $par_node->unlink_node($par_node);
400  }
401 
402  if (is_array($a_par_array)) {
403  foreach ($a_par_array as $par => $val) {
404  if (ilMediaItem::checkParameter($par, $val)) {
405  $attributes = array("Name" => $par, "Value" => $val);
406  $this->dom_util->addElementToList(
407  $this->getItemNode(),
408  "Parameter",
409  array("MapArea"),
410  "",
411  $attributes
412  );
413  }
414  }
415  }
416  }
static checkParameter(string $a_par, string $a_val)
Check parameter (filter javascript related and other unsafe parameters/values)
getParameterNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPcId()

ilMediaAliasItem::setPcId ( string  $a_pcid)

Definition at line 113 of file class.ilMediaAliasItem.php.

Referenced by __construct().

113  : void
114  {
115  $this->pcid = $a_pcid;
116  }
+ Here is the caller graph for this function:

◆ setShape()

ilMediaAliasItem::setShape ( int  $a_nr,
string  $a_shape_type,
string  $a_coords 
)

Set shape and coords of single area.

Definition at line 605 of file class.ilMediaAliasItem.php.

References getMapAreaNodes(), and getPcId().

609  : void {
610  $ma_nodes = $this->getMapAreaNodes(
611  $this->hier_id,
612  $this->purpose,
613  $this->getPcId()
614  );
615  if (is_object($ma_nodes[$a_nr - 1])) {
616  $ma_nodes[$a_nr - 1]->set_attribute("Shape", $a_shape_type);
617  $ma_nodes[$a_nr - 1]->set_attribute("Coords", $a_coords);
618  }
619  }
getMapAreaNodes(string $a_hier_id, string $a_purpose, string $a_pc_id="")
+ Here is the call graph for this function:

◆ setTextRepresentation()

ilMediaAliasItem::setTextRepresentation ( string  $a_text_representation)

Definition at line 303 of file class.ilMediaAliasItem.php.

References getItemNode().

Referenced by PCMediaObjectTest\testDeriveTextRepresentation(), and PCMediaObjectTest\testTextRepresentation().

305  : void {
306  $this->dom_util->setFirstOptionalElement(
307  $this->getItemNode(),
308  "TextRepresentation",
309  array("Parameter", "MapArea"),
310  $a_text_representation,
311  array()
312  );
313  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setWidth()

ilMediaAliasItem::setWidth ( string  $a_width)

Definition at line 151 of file class.ilMediaAliasItem.php.

References getItemNode().

Referenced by PCMediaObjectTest\testDeriveSize(), and PCMediaObjectTest\testWidth().

151  : void
152  {
153  $this->dom_util->setFirstOptionalElement(
154  $this->getItemNode(),
155  "Layout",
156  array("Caption", "TextRepresentation", "Parameter", "MapArea"),
157  "",
158  array("Width" => $a_width),
159  false
160  );
161  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $dom_doc

DOMDocument ilMediaAliasItem::$dom_doc
protected

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

◆ $dom_util

ILIAS COPage Dom DomUtil ilMediaAliasItem::$dom_util
protected

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

◆ $hier_id

string ilMediaAliasItem::$hier_id = ""

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

◆ $item_node

DOMNode ilMediaAliasItem::$item_node = null

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

Referenced by getItemNode(), and insert().

◆ $lng

ilLanguage ilMediaAliasItem::$lng
protected

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

◆ $parent_node_name

string ilMediaAliasItem::$parent_node_name
protected

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

Referenced by insert().

◆ $pcid

string ilMediaAliasItem::$pcid
protected

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

Referenced by getPcId().

◆ $purpose

string ilMediaAliasItem::$purpose = ""

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


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