19declare(strict_types=1);
37 string $a_postvar =
""
41 $this->
lng = $DIC->language();
42 $this->rbacsystem =
$DIC->rbac()->system();
49 $this->latitude = $a_latitude;
59 $this->longitude = $a_longitude;
67 public function setZoom(?
int $a_zoom): void
69 $this->zoom = $a_zoom;
79 $this->address = $a_address;
89 $lat = (isset($a_values[$this->
getPostVar()][
"latitude"]) && $a_values[$this->
getPostVar()][
"latitude"] !=
"")
90 ? (
float) $a_values[$this->
getPostVar()][
"latitude"]
92 $lon = (isset($a_values[$this->
getPostVar()][
"longitude"]) && $a_values[$this->
getPostVar()][
"longitude"] !=
"")
93 ? (
float) $a_values[$this->
getPostVar()][
"longitude"]
106 !isset($val[
"latitude"]) || trim($val[
"latitude"]) ==
"" ||
107 !isset($val[
"longitude"]) || trim($val[
"longitude"]) ==
""
119 "latitude" => (float) ($val[
"latitude"] ?? 0),
120 "longitude" => (float) ($val[
"longitude"] ?? 0),
121 "zoom" => (
int) ($val[
"zoom"] ?? 0),
122 "address" => ($val[
"address"] ??
"")
133 $tpl =
new ilTemplate(
"tpl.prop_location.html",
true,
true,
"components/ILIAS/Form");
134 $tpl->setVariable(
"POST_VAR", $this->
getPostVar());
135 $tpl->setVariable(
"TXT_ZOOM",
$lng->
txt(
"maps_zoom_level"));
136 $tpl->setVariable(
"TXT_LATITUDE",
$lng->
txt(
"maps_latitude"));
137 $tpl->setVariable(
"TXT_LONGITUDE",
$lng->
txt(
"maps_longitude"));
138 $tpl->setVariable(
"LOC_DESCRIPTION",
$lng->
txt(
"maps_std_location_desc"));
146 $tpl->setVariable(
"PROPERTY_VALUE_LAT", $lat);
147 $tpl->setVariable(
"PROPERTY_VALUE_LONG", $long);
148 for ($i = 0; $i <= 18; $i++) {
152 $map_id =
"map_" . md5(uniqid());
164 array(
"id" => $map_id .
"_zoom",
165 "onchange" =>
"ilUpdateMap('" . $map_id .
"');")
168 $tpl->setVariable(
"MAP_ID", $map_id);
175 $tpl->setVariable(
"TXT_ADDR",
$lng->
txt(
"address"));
176 $tpl->setVariable(
"TXT_LOOKUP",
$lng->
txt(
"maps_lookup_address"));
177 $tpl->setVariable(
"TXT_ADDRESS", $this->
getAddress());
178 $tpl->setVariable(
"MAP_ID_ADDR", $map_id);
179 $tpl->setVariable(
"POST_VAR_ADDR", $this->
getPostVar());
182 $tpl->setVariable(
"TEXT",
$lng->
txt(
"configure_geolocation"));
187 $map_gui->setMapId($map_id)
188 ->setLatitude((
string) $lat)
189 ->setLongitude((
string) $long)
191 ->setEnableTypeControl(
true)
192 ->setEnableLargeMapControl(
true)
193 ->setEnableUpdateListener(
true)
194 ->setEnableCentralMarker(
true);
196 $tpl->setVariable(
"MAP", $map_gui->getHtml());
setVariable($variable, $value='')
Sets a variable value.
loadLanguageModule(string $a_module)
Load language module.
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...
static getStdGeolocationServer()
Returns the reverse geolocation server to be used in the installation.
static getMapGUI()
Get an instance of the GUI class.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc