Changeset 9 for trunk/Packages/Common/Modules/ModuleAdmin.php
- Timestamp:
- Jun 1, 2023, 1:01:38 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Modules/ModuleAdmin.php
r8 r9 8 8 { 9 9 parent::__construct($System); 10 $this->Name = ' ModuleManager';10 $this->Name = 'Admin'; 11 11 $this->Version = '1.0'; 12 12 $this->Creator = 'Chronos'; … … 49 49 ), 50 50 )); 51 $this->System->FormManager->RegisterFormType('TModule', array(51 Core::Cast($this->System)->FormManager->RegisterFormType('TModule', array( 52 52 'Type' => 'Reference', 53 53 'Table' => 'Module', … … 56 56 'Filter' => '1', 57 57 )); 58 $this->System->FormManager->RegisterFormType('TModelListModule', array(58 Core::Cast($this->System)->FormManager->RegisterFormType('TModelListModule', array( 59 59 'Type' => 'ManyToOne', 60 60 'Table' => 'Model', … … 63 63 'Filter' => '1', 64 64 )); 65 $this->System->FormManager->RegisterClass('Model', array(65 Core::Cast($this->System)->FormManager->RegisterClass('Model', array( 66 66 'Title' => 'Modely', 67 67 'Table' => 'Model', … … 76 76 ), 77 77 )); 78 $this->System->FormManager->RegisterFormType('TModel', array(78 Core::Cast($this->System)->FormManager->RegisterFormType('TModel', array( 79 79 'Type' => 'Reference', 80 80 'Table' => 'Model', … … 83 83 'Filter' => '1', 84 84 )); 85 $this->System->FormManager->RegisterFormType('TModelFieldListModel', array(85 Core::Cast($this->System)->FormManager->RegisterFormType('TModelFieldListModel', array( 86 86 'Type' => 'ManyToOne', 87 87 'Table' => 'ModelField', … … 90 90 'Filter' => '1', 91 91 )); 92 $this->System->FormManager->RegisterClass('ModelField', array(92 Core::Cast($this->System)->FormManager->RegisterClass('ModelField', array( 93 93 'Title' => 'Pole modelu', 94 94 'Table' => 'ModelField', … … 104 104 ), 105 105 )); 106 $this->System->FormManager->RegisterFormType('TModuleLink', array(106 Core::Cast($this->System)->FormManager->RegisterFormType('TModuleLink', array( 107 107 'Type' => 'Reference', 108 108 'Table' => 'ModuleLink', … … 111 111 'Filter' => '1', 112 112 )); 113 $this->System->FormManager->RegisterFormType('TModuleLinkListModule', array(113 Core::Cast($this->System)->FormManager->RegisterFormType('TModuleLinkListModule', array( 114 114 'Type' => 'ManyToOne', 115 115 'Table' => 'ModuleLink', … … 118 118 'Filter' => '1', 119 119 )); 120 $this->System->FormManager->RegisterClass('ModuleLink', array(120 Core::Cast($this->System)->FormManager->RegisterClass('ModuleLink', array( 121 121 'Title' => 'Vazby modulu', 122 122 'Table' => 'ModuleLink', … … 127 127 ), 128 128 )); 129 $this->System->FormManager->RegisterFormType('TModule', array(129 Core::Cast($this->System)->FormManager->RegisterFormType('TModule', array( 130 130 'Type' => 'Reference', 131 131 'Table' => 'Module', … … 250 250 'Type' => ModelColumnType::GetName($Field->Type), 'Nullable' => (int)$Field->Nullable)); 251 251 } 252 if ($ModelDesc->DefaultValues != null)253 { 254 $Values = call_user_func('self::'.$ModelDesc->DefaultValues );252 if ($ModelDesc->DefaultValuesMethod != null) 253 { 254 $Values = call_user_func('self::'.$ModelDesc->DefaultValuesMethod); 255 255 foreach ($Values as $Value) 256 256 { … … 303 303 { 304 304 //DebugLog('Loading modules...'); 305 $this->Modules = array();306 305 $Query = 'SELECT `Id`, `Name`,`Installed` FROM `Module`'; 307 306 $DbResult = $this->Database->query($Query); … … 492 491 $Output = ''; 493 492 494 $Pageing = new Paging( );493 $Pageing = new Paging($this->System); 495 494 $Pageing->TotalCount = count($this->System->ModuleManager->Modules); 496 $Table = new VisualTable( );495 $Table = new VisualTable($this->System); 497 496 $Table->SetColumns(array( 498 497 array('Name' => 'Name', 'Title' => T('Name')),
Note:
See TracChangeset
for help on using the changeset viewer.