Changeset 404 for branches/Modular/Modules/System/System.php
- Timestamp:
- Jun 12, 2012, 6:41:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Modular/Modules/System/System.php
r403 r404 1 1 <?php 2 3 class PageModules extends Page 4 { 5 function __construct() 6 { 7 parent::__construct(); 8 $this->FullTitle = 'Správa modulů'; 9 $this->ShortTitle = 'Moduly'; 10 } 11 12 function Show() 13 { 14 $View = new ViewModules($this->System); 15 $View->LoadFromDatabase(); 16 return($View->Show()); 17 } 18 } 19 20 class ViewModules extends ViewList 21 { 22 function __construct($System) 23 { 24 parent::__construct($System); 25 $this->Name = 'SystemModule'; 26 $this->AddItemString('Name', 'Jméno'); 27 $this->AddItemString('Creator', 'Tvůrce'); 28 $this->AddItemString('Version', 'Verze'); 29 $this->AddItemString('License', 'Licence'); 30 $this->AddItemBoolean('Installed', 'Instalováno'); 31 $this->AddItemText('Description', 'Popis'); 32 } 33 } 2 34 3 35 class SystemView extends Model … … 34 66 } 35 67 68 class SystemModule extends Model 69 { 70 function __construct($Database, $System) 71 { 72 parent::__construct($Database, $System); 73 $this->Name = 'SystemModule'; 74 $this->AddPropertyString('Name'); 75 $this->AddPropertyString('Creator'); 76 $this->AddPropertyString('Version'); 77 $this->AddPropertyString('License'); 78 $this->AddPropertyBoolean('Installed'); 79 $this->AddPropertyText('Description'); 80 } 81 82 function Install() 83 { 84 // Do nothing, already installed by ModuleManager 85 } 86 87 function UnInstall() 88 { 89 // Do nothing, managed by ModuleManager 90 } 91 } 92 36 93 class ModuleSystem extends Module 37 94 { … … 44 101 $this->License = 'GNU/GPL'; 45 102 $this->Description = 'Base system module'; 46 $this->Dependencies = array('User'); 47 $this->SupportedModels = array('SystemView', 'SystemAction', 'SystemMenu'); 103 $this->Dependencies = array(); 104 $this->SupportedModels = array('SystemView', 'SystemAction', 'SystemMenu', 105 'SystemModule'); 48 106 } 49 107 … … 60 118 function Init() 61 119 { 120 $this->System->Pages['modules'] = 'PageModules'; 62 121 } 63 122 }
Note:
See TracChangeset
for help on using the changeset viewer.