-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe2a33a
commit 9778c82
Showing
20 changed files
with
621 additions
and
590 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,39 @@ | ||
<?php | ||
|
||
<?php | ||
|
||
class listBaseLayer implements jIFormsDatasource | ||
{ | ||
protected $formId = 0; | ||
|
||
protected $data = array(); | ||
|
||
function __construct($id) | ||
{ | ||
$this->formId = $id; | ||
|
||
$this->data = array( | ||
'osmMapnik' => 'OSM Mapnik', | ||
'osmStadiaMapsToner' => 'OSM StadiaMaps Toner', | ||
'bingStreets' => 'Bing Streets', | ||
'bingSatellite' => 'Bing Satellite', | ||
'bingHybrid' => 'Bing Hybrid', | ||
'ignStreets' => 'IGN Streets', | ||
'ignSatellite' => 'IGN Satellite', | ||
'ignCadastral' => 'IGN Cadastral', | ||
'emptyBaselayer' => jLocale::get('view~dictionnary.baselayer.empty.title') | ||
); | ||
} | ||
|
||
public function getData($form) | ||
{ | ||
return ($this->data); | ||
} | ||
|
||
public function getLabel($key) | ||
{ | ||
if(isset($this->data[$key])) | ||
return $this->data[$key]; | ||
else | ||
return null; | ||
} | ||
|
||
protected $formId = 0; | ||
|
||
protected $data = []; | ||
|
||
public function __construct($id) | ||
{ | ||
$this->formId = $id; | ||
|
||
$this->data = [ | ||
'osmMapnik' => 'OSM Mapnik', | ||
'osmStadiaMapsToner' => 'OSM StadiaMaps Toner', | ||
'bingStreets' => 'Bing Streets', | ||
'bingSatellite' => 'Bing Satellite', | ||
'bingHybrid' => 'Bing Hybrid', | ||
'ignStreets' => 'IGN Streets', | ||
'ignSatellite' => 'IGN Satellite', | ||
'ignCadastral' => 'IGN Cadastral', | ||
'emptyBaselayer' => jLocale::get('view~dictionnary.baselayer.empty.title'), | ||
]; | ||
} | ||
|
||
public function getData($form) | ||
{ | ||
return $this->data; | ||
} | ||
|
||
public function getLabel($key) | ||
{ | ||
if (isset($this->data[$key])) { | ||
return $this->data[$key]; | ||
} | ||
|
||
return null; | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,38 @@ | ||
<?php | ||
|
||
<?php | ||
|
||
class listRepositories implements jIFormsDatasource | ||
{ | ||
protected $formId = 0; | ||
protected $formId = 0; | ||
|
||
protected $data = array(); | ||
protected $data = []; | ||
|
||
function __construct($id) | ||
{ | ||
$this->formId = $id; | ||
public function __construct($id) | ||
{ | ||
$this->formId = $id; | ||
|
||
$repositories = array(); | ||
$repositories = []; | ||
|
||
foreach (lizmap::getRepositoryList() as $repositoryName) { | ||
$repository = lizmap::getRepository($repositoryName); | ||
if( jAcl2::check('lizmap.repositories.view', $repository->getKey() )){ | ||
$repositories[$repository->getKey()] = $repository->getData('label'); | ||
foreach (lizmap::getRepositoryList() as $repositoryName) { | ||
$repository = lizmap::getRepository($repositoryName); | ||
if (jAcl2::check('lizmap.repositories.view', $repository->getKey())) { | ||
$repositories[$repository->getKey()] = $repository->getData('label'); | ||
} | ||
} | ||
} | ||
|
||
$this->data = $repositories; | ||
} | ||
$this->data = $repositories; | ||
} | ||
|
||
public function getData($form) | ||
{ | ||
return ($this->data); | ||
} | ||
public function getData($form) | ||
{ | ||
return $this->data; | ||
} | ||
|
||
public function getLabel($key) | ||
{ | ||
if(isset($this->data[$key])) | ||
return $this->data[$key]; | ||
else | ||
return null; | ||
} | ||
public function getLabel($key) | ||
{ | ||
if (isset($this->data[$key])) { | ||
return $this->data[$key]; | ||
} | ||
|
||
return null; | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.