Changeset 887 for trunk/Modules/Map/Map.php
- Timestamp:
- Nov 20, 2020, 12:08:12 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Map/Map.php
r874 r887 5 5 class PageNetworkMap extends Page 6 6 { 7 var $FullTitle = 'Mapa sítě'; 8 var $ShortTitle = 'Mapa sítě'; 9 var $ParentClass = 'PagePortal'; 7 function __construct(System $System) 8 { 9 parent::__construct($System); 10 $this->FullTitle = 'Mapa sítě'; 11 $this->ShortTitle = 'Mapa sítě'; 12 $this->ParentClass = 'PagePortal'; 13 } 10 14 //var $Load = 'initialize()'; 11 15 //var $Unload = 'GUnload()'; 12 16 13 function Show() 14 { 15 if (! $this->System->User->CheckPermission('Map', 'Show'))17 function Show(): string 18 { 19 if (!ModuleUser::Cast($this->System->GetModule('User'))->User->CheckPermission('Map', 'Show')) 16 20 return 'Nemáte oprávnění'; 17 21 … … 23 27 } 24 28 25 function ShowPosition() 29 function ShowPosition(): string 26 30 { 27 31 $DbResult = $this->Database->select('MapPosition', '*', '`Id`='.$_GET['i']); … … 44 48 } 45 49 46 function ShowMain() 50 function ShowMain(): string 47 51 { 48 52 $Map = new MapOpenStreetMaps($this->System); … … 242 246 class TypeMapPosition extends TypeString 243 247 { 244 function OnEdit( $Item)248 function OnEdit(array $Item): string 245 249 { 246 250 $Output = parent::OnEdit($Item); … … 255 259 class ModuleMap extends AppModule 256 260 { 257 function __construct( $System)261 function __construct(System $System) 258 262 { 259 263 parent::__construct($System); … … 263 267 $this->License = 'GNU/GPL'; 264 268 $this->Description = 'Show objects on Google maps'; 265 $this->Dependencies = array('Network' );269 $this->Dependencies = array('Network', 'User'); 266 270 $this->SupportedModels = array(); 267 271 } 268 272 269 function DoStart() 273 function DoStart(): void 270 274 { 271 275 $this->System->Pages['map'] = 'PageNetworkMap'; … … 310 314 } 311 315 312 function DoInstall() 316 function DoInstall(): void 313 317 { 314 318 $this->System->Database->query("CREATE TABLE IF NOT EXISTS `MapPosition` ( … … 320 324 } 321 325 322 function DoUninstall() 326 function DoUninstall(): void 323 327 { 324 328 $this->Database->query('DROP TABLE `MapPosition`');
Note:
See TracChangeset
for help on using the changeset viewer.