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'));
48 switch ($this->
ctrl->getNextClass()) {
49 case strtolower(ilPermissionGUI::class):
51 $this->tabs_gui->activateTab(
'permissions');
54 $cmd = $this->
ctrl->getCmd(
'view');
55 if (in_array($cmd, [
'view',
'save'],
true)) {
56 $this->tabs_gui->activateTab(
'view');
63 public function view(): void
70 $this->tabs_gui->addTab(
72 $this->
lng->txt(
'view'),
73 $this->ctrl->getLinkTarget($this,
'view'),
76 $this->tabs_gui->addTab(
78 $this->
lng->txt(
'perm_settings'),
79 $this->ctrl->getLinkTargetByClass([self::class, ilPermissionGUI::class],
'perm')
92 $form->setFormAction($ilCtrl->getFormAction($this));
93 $form->setTitle(
$lng->
txt(
'maps_settings'));
98 $enable->setInfo(
$lng->
txt(
'maps_enable_maps_info'));
99 $form->addItem($enable);
104 $types->setValue(
$type);
105 $form->addItem($types);
108 if (
$type ===
'openlayers') {
114 $geolocation->setInfo(
$lng->
txt(
'maps_custom_geolocation_server_info'));
116 $form->addItem($tile);
117 $form->addItem($geolocation);
121 $key->setMaxLength(200);
123 $form->addItem($key);
128 $lng->
txt(
'maps_std_location'),
132 $loc_prop->setLatitude($std_latitude);
133 $loc_prop->setLongitude($std_longitude);
134 $loc_prop->setZoom((
int) $std_zoom);
135 $form->addItem($loc_prop);
137 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
138 $form->addCommandButton(
'save',
$lng->
txt(
'save'));
139 $form->addCommandButton(
'view',
$lng->
txt(
'cancel'));
148 if ($form->checkInput()) {
149 if ($form->getInput(
'type') ===
'openlayers' &&
'openlayers' ===
ilMapUtil::getType()) {
152 $form->getInput(
'geolocation')
160 $location = $form->getInput(
'std_location');
165 $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.
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.