Class ilPCMap.
More...
|
static | handleCaptionInput ($a_text) |
|
static | handleCaptionFormOutput ($a_text) |
|
static | incEdId ($ed_id) |
| Increases an hierarchical editing id at lowest level (last number) More...
|
|
static | decEdId ($ed_id) |
| Decreases an hierarchical editing id at lowest level (last number) More...
|
|
static | haveSameContainer ($ed_id1, $ed_id2) |
| Check, if two ids are in same container. More...
|
|
static | sortHierIds ($a_array) |
| Sort an array of Hier IDS in ascending order. More...
|
|
static | getLangVars () |
| Get lang vars needed for editing. More...
|
|
static | handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false) |
| Handle copied content. More...
|
|
static | afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation) |
| After page has been updated (or created) More...
|
|
static | beforePageDelete ($a_page) |
| Before page is being deleted. More...
|
|
static | afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr) |
| After page history entry has been created. More...
|
|
Class ilPCMap.
Map content object (see ILIAS DTD)
- Author
- Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 17 of file class.ilPCMap.php.
◆ create()
ilPCMap::create |
( |
& |
$a_pg_obj, |
|
|
|
$a_hier_id, |
|
|
|
$a_pc_id = "" |
|
) |
| |
Create map node in xml.
- Parameters
-
object | $a_pg_obj | Page Object |
string | $a_hier_id | Hierarchical ID |
Definition at line 44 of file class.ilPCMap.php.
References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.
49 $this->map_node =& $this->dom->create_element(
"Map");
50 $this->map_node =& $this->node->append_child($this->map_node);
51 $this->map_node->set_attribute(
"Latitude",
"0");
52 $this->map_node->set_attribute(
"Longitude",
"0");
53 $this->map_node->set_attribute(
"Zoom",
"3");
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
◆ getCaption()
Get Caption.
- Returns
- string Caption
Definition at line 251 of file class.ilPCMap.php.
253 if (is_object($this->map_node))
255 $childs = $this->map_node->child_nodes();
256 foreach($childs as $child)
258 if ($child->node_name() ==
"MapCaption")
260 return $child->get_content();
◆ getHeight()
Get Height.
- Returns
- integer Height
Definition at line 197 of file class.ilPCMap.php.
199 if (is_object($this->map_node))
201 $childs = $this->map_node->child_nodes();
202 foreach($childs as $child)
204 if ($child->node_name() ==
"Layout")
206 return $child->get_attribute(
"Height");
◆ getHorizontalAlign()
ilPCMap::getHorizontalAlign |
( |
| ) |
|
Get Horizontal Alignment.
- Returns
- string Horizontal Alignment
Definition at line 217 of file class.ilPCMap.php.
219 if (is_object($this->map_node))
221 $childs = $this->map_node->child_nodes();
222 foreach($childs as $child)
224 if ($child->node_name() ==
"Layout")
226 return $child->get_attribute(
"HorizontalAlign");
◆ getLatitude()
Get latitude of map.
- Returns
- string latitude
Definition at line 81 of file class.ilPCMap.php.
83 if (is_object($this->map_node))
85 return $this->map_node->get_attribute(
"Latitude");
◆ getLongitude()
ilPCMap::getLongitude |
( |
| ) |
|
Get longitude of map.
- Returns
- string longitude
Definition at line 114 of file class.ilPCMap.php.
116 if (is_object($this->map_node))
118 return $this->map_node->get_attribute(
"Longitude");
◆ getWidth()
Get Width.
- Returns
- integer Width
Definition at line 177 of file class.ilPCMap.php.
179 if (is_object($this->map_node))
181 $childs = $this->map_node->child_nodes();
182 foreach($childs as $child)
184 if ($child->node_name() ==
"Layout")
186 return $child->get_attribute(
"Width");
◆ getZoom()
Get zoom of map.
- Returns
- string zoom
Definition at line 147 of file class.ilPCMap.php.
149 if (is_object($this->map_node))
151 return $this->map_node->get_attribute(
"Zoom");
◆ handleCaptionFormOutput()
static ilPCMap::handleCaptionFormOutput |
( |
|
$a_text | ) |
|
|
static |
Definition at line 275 of file class.ilPCMap.php.
277 $a_text = str_replace(
"<br />",
"\n", $a_text);
278 $a_text = str_replace(
"<br/>",
"\n", $a_text);
◆ handleCaptionInput()
static ilPCMap::handleCaptionInput |
( |
|
$a_text | ) |
|
|
static |
Definition at line 266 of file class.ilPCMap.php.
268 $a_text = str_replace(chr(13).chr(10),
"<br />",$a_text);
269 $a_text = str_replace(chr(13),
"<br />", $a_text);
270 $a_text = str_replace(chr(10),
"<br />", $a_text);
◆ init()
◆ modifyPageContentPostXsl()
ilPCMap::modifyPageContentPostXsl |
( |
|
$a_html, |
|
|
|
$a_mode |
|
) |
| |
Modify page content after xsl.
- Parameters
-
- Returns
- string
Definition at line 289 of file class.ilPCMap.php.
References ilMapUtil\getMapGUI().
292 $start = strpos($a_html,
"[[[[[Map;");
295 $end = strpos($a_html,
"]]]]]", $start);
300 $param = substr($a_html, $start + 9, $end - $start - 9);
302 $param = explode(
";", $param);
303 if (is_numeric($param[0]) && is_numeric($param[1]) && is_numeric($param[2]))
305 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
307 $map_gui->setMapId(
"map_".$i)
308 ->setLatitude($param[0])
309 ->setLongitude($param[1])
311 ->setWidth($param[3].
"px")
312 ->setHeight($param[4].
"px")
313 ->setEnableTypeControl(
true)
314 ->setEnableNavigationControl(
true)
315 ->setEnableCentralMarker(
true);
316 $h2 = substr($a_html, 0, $start).
318 substr($a_html, $end + 5);
322 $start = strpos($a_html,
"[[[[[Map;", $start + 5);
326 $end = strpos($a_html,
"]]]]]", $start);
static getMapGUI()
Get an instance of the GUI class.
◆ setCaption()
ilPCMap::setCaption |
( |
|
$a_caption | ) |
|
Set Caption.
- Parameters
-
Definition at line 237 of file class.ilPCMap.php.
239 if (is_object($this->map_node))
241 ilDomUtil::setFirstOptionalElement($this->dom, $this->map_node,
242 "MapCaption", array(), $a_caption, array());
◆ setLatitude()
ilPCMap::setLatitude |
( |
|
$a_lat | ) |
|
Set latitude of map.
- Parameters
-
Definition at line 61 of file class.ilPCMap.php.
65 $this->map_node->set_attribute(
"Latitude", $a_lat);
69 if ($this->map_node->has_attribute(
"Latitude"))
71 $this->map_node->remove_attribute(
"Latitude");
◆ setLayout()
ilPCMap::setLayout |
( |
|
$a_width, |
|
|
|
$a_height, |
|
|
|
$a_horizontal_align |
|
) |
| |
Set Layout.
- Parameters
-
integer | $a_width | Width |
integer | $a_height | Height |
integer | $a_horizonal_align | Horizontal Alignment |
Definition at line 162 of file class.ilPCMap.php.
164 if (is_object($this->map_node))
166 ilDomUtil::setFirstOptionalElement($this->dom, $this->map_node,
167 "Layout", array(
"MapCaption"),
"", array(
"Width" => $a_width,
168 "Height" => $a_height,
"HorizontalAlign" => $a_horizontal_align));
◆ setLongitude()
ilPCMap::setLongitude |
( |
|
$a_long | ) |
|
Set longitude of map.
- Parameters
-
Definition at line 94 of file class.ilPCMap.php.
98 $this->map_node->set_attribute(
"Longitude", $a_long);
102 if ($this->map_node->has_attribute(
"Longitude"))
104 $this->map_node->remove_attribute(
"Longitude");
◆ setNode()
ilPCMap::setNode |
( |
& |
$a_node | ) |
|
Set node.
Definition at line 32 of file class.ilPCMap.php.
34 parent::setNode($a_node);
35 $this->map_node =& $a_node->first_child();
◆ setZoom()
ilPCMap::setZoom |
( |
|
$a_zoom | ) |
|
Set zoom of map.
- Parameters
-
Definition at line 127 of file class.ilPCMap.php.
131 $this->map_node->set_attribute(
"Zoom", $a_zoom);
135 if ($this->map_node->has_attribute(
"Zoom"))
137 $this->map_node->remove_attribute(
"Zoom");
◆ $map_node
The documentation for this class was generated from the following file: