19declare(strict_types=1);
33 $this->rbacsystem =
$DIC->rbac()->system();
38 if (!$this->rbacsystem->checkAccess(
'read', $this->object->getRefId())) {
39 $this->
ilias->raiseError(
40 $this->
lng->txt(
'permission_denied'),
41 $this->ilias->error_obj->MESSAGE
45 $this->
lng->loadLanguageModule(
'maps');
46 $this->tpl->setTitle($this->
lng->txt(
'obj_maps'));
49 switch ($this->
ctrl->getNextClass()) {
50 case strtolower(ilPermissionGUI::class):
52 $this->tabs_gui->activateTab(
'permissions');
55 $cmd = $this->
ctrl->getCmd(
'view');
56 if (in_array($cmd, [
'view',
'save'],
true)) {
57 $this->tabs_gui->activateTab(
'view');
64 public function view(): void
71 $this->tabs_gui->addTab(
73 $this->
lng->txt(
'view'),
74 $this->ctrl->getLinkTarget($this,
'view'),
77 $this->tabs_gui->addTab(
79 $this->
lng->txt(
'perm_settings'),
80 $this->ctrl->getLinkTargetByClass([self::class, ilPermissionGUI::class],
'perm')
93 $form->setFormAction($ilCtrl->getFormAction($this));
94 $form->setTitle(
$lng->
txt(
'maps_settings'));
99 $enable->setInfo(
$lng->
txt(
'maps_enable_maps_info'));
100 $form->addItem($enable);
105 $types->setValue(
$type);
106 $form->addItem($types);
109 if (
$type ===
'openlayers') {
115 $geolocation->setInfo(
$lng->
txt(
'maps_custom_geolocation_server_info'));
117 $form->addItem($tile);
118 $form->addItem($geolocation);
122 $key->setMaxLength(200);
124 $form->addItem($key);
129 $lng->
txt(
'maps_std_location'),
133 $loc_prop->setLatitude($std_latitude);
134 $loc_prop->setLongitude($std_longitude);
135 $loc_prop->setZoom((
int) $std_zoom);
136 $form->addItem($loc_prop);
138 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
139 $form->addCommandButton(
'save',
$lng->
txt(
'save'));
140 $form->addCommandButton(
'view',
$lng->
txt(
'cancel'));
149 if ($form->checkInput()) {
150 if ($form->getInput(
'type') ===
'openlayers' &&
'openlayers' ===
ilMapUtil::getType()) {
153 $form->getInput(
'geolocation')
161 $location = $form->getInput(
'std_location');
166 $this->
ctrl->redirect($this,
'view');
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 setActivated(bool $activated)
static getStdGeolocationServer()
Returns the reverse geolocation server to be used in the installation.
static setStdLongitude(string $lon)
static setStdTileServers(string $tile)
static setStdLatitude(string $lat)
static getStdTileServers()
Returns the tile server to be used in the installation.
static setStdGeolocationServer($geolocation)
static setStdZoom(string $zoom)
static isActivated()
Checks whether Map feature is activated.
static setType(string $type)
static getAvailableMapTypes()
Get a dict { $id => $name } for available maps services.
static setApiKey(string $api_key)
@ilCtrl_isCalledBy ilObjMapsGUI: ilAdministrationGUI @ilCtrl_Calls ilObjMapsGUI: ilPermissionGUI
readonly ilRbacSystem $rbacsystem
__construct($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
Class ilObjectGUI Basic methods of all Output classes.
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
This class represents a text property in a property form.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ilObjForumAdministration.