Ignore:
Timestamp:
Jun 1, 2023, 1:01:38 AM (18 months ago)
Author:
chronos
Message:
  • Fixed: Modules initialization.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Modules/ModuleAdmin.php

    r8 r9  
    88  {
    99    parent::__construct($System);
    10     $this->Name = 'ModuleManager';
     10    $this->Name = 'Admin';
    1111    $this->Version = '1.0';
    1212    $this->Creator = 'Chronos';
     
    4949      ),
    5050    ));
    51     $this->System->FormManager->RegisterFormType('TModule', array(
     51    Core::Cast($this->System)->FormManager->RegisterFormType('TModule', array(
    5252      'Type' => 'Reference',
    5353      'Table' => 'Module',
     
    5656      'Filter' => '1',
    5757    ));
    58     $this->System->FormManager->RegisterFormType('TModelListModule', array(
     58    Core::Cast($this->System)->FormManager->RegisterFormType('TModelListModule', array(
    5959      'Type' => 'ManyToOne',
    6060      'Table' => 'Model',
     
    6363      'Filter' => '1',
    6464    ));
    65     $this->System->FormManager->RegisterClass('Model', array(
     65    Core::Cast($this->System)->FormManager->RegisterClass('Model', array(
    6666      'Title' => 'Modely',
    6767      'Table' => 'Model',
     
    7676      ),
    7777    ));
    78     $this->System->FormManager->RegisterFormType('TModel', array(
     78    Core::Cast($this->System)->FormManager->RegisterFormType('TModel', array(
    7979      'Type' => 'Reference',
    8080      'Table' => 'Model',
     
    8383      'Filter' => '1',
    8484    ));
    85     $this->System->FormManager->RegisterFormType('TModelFieldListModel', array(
     85    Core::Cast($this->System)->FormManager->RegisterFormType('TModelFieldListModel', array(
    8686      'Type' => 'ManyToOne',
    8787      'Table' => 'ModelField',
     
    9090      'Filter' => '1',
    9191    ));
    92     $this->System->FormManager->RegisterClass('ModelField', array(
     92    Core::Cast($this->System)->FormManager->RegisterClass('ModelField', array(
    9393      'Title' => 'Pole modelu',
    9494      'Table' => 'ModelField',
     
    104104      ),
    105105    ));
    106     $this->System->FormManager->RegisterFormType('TModuleLink', array(
     106    Core::Cast($this->System)->FormManager->RegisterFormType('TModuleLink', array(
    107107      'Type' => 'Reference',
    108108      'Table' => 'ModuleLink',
     
    111111      'Filter' => '1',
    112112    ));
    113     $this->System->FormManager->RegisterFormType('TModuleLinkListModule', array(
     113    Core::Cast($this->System)->FormManager->RegisterFormType('TModuleLinkListModule', array(
    114114      'Type' => 'ManyToOne',
    115115      'Table' => 'ModuleLink',
     
    118118      'Filter' => '1',
    119119    ));
    120     $this->System->FormManager->RegisterClass('ModuleLink', array(
     120    Core::Cast($this->System)->FormManager->RegisterClass('ModuleLink', array(
    121121      'Title' => 'Vazby modulu',
    122122      'Table' => 'ModuleLink',
     
    127127      ),
    128128    ));
    129     $this->System->FormManager->RegisterFormType('TModule', array(
     129    Core::Cast($this->System)->FormManager->RegisterFormType('TModule', array(
    130130      'Type' => 'Reference',
    131131      'Table' => 'Module',
     
    250250        'Type' => ModelColumnType::GetName($Field->Type), 'Nullable' => (int)$Field->Nullable));
    251251    }
    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);
    255255      foreach ($Values as $Value)
    256256      {
     
    303303  {
    304304    //DebugLog('Loading modules...');
    305     $this->Modules = array();
    306305    $Query = 'SELECT `Id`, `Name`,`Installed` FROM `Module`';
    307306    $DbResult = $this->Database->query($Query);
     
    492491    $Output = '';
    493492
    494     $Pageing = new Paging();
     493    $Pageing = new Paging($this->System);
    495494    $Pageing->TotalCount = count($this->System->ModuleManager->Modules);
    496     $Table = new VisualTable();
     495    $Table = new VisualTable($this->System);
    497496    $Table->SetColumns(array(
    498497      array('Name' => 'Name', 'Title' => T('Name')),
Note: See TracChangeset for help on using the changeset viewer.