Ignore:
Timestamp:
Jan 5, 2021, 10:30:31 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Further improved models initialization system.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Document/Document.php

    r893 r894  
    8282  function GetModels(): array
    8383  {
    84     return array('FinanceYear', 'DocumentLineCode', 'DocumentLine', 'DocumentLineSequence');
     84    return array(FinanceYear::GetClassName(), DocumentLineCode::GetClassName(), DocumentLine::GetClassName(),
     85      DocumentLineSequence::GetClassName());
    8586  }
    8687}
     
    9091  static function GetDesc(): ModelDesc
    9192  {
    92     $Desc = new ModelDesc('DocumentLine');
     93    $Desc = new ModelDesc(self::GetClassName());
    9394    $Desc->AddString('Name');
    9495    $Desc->AddString('ShortCut');
     
    102103  static function GetDesc(): ModelDesc
    103104  {
    104     $Desc = new ModelDesc('DocumentLineCode');
    105     $Desc->AddReference('DocumentLine', 'DocumentLine');
     105    $Desc = new ModelDesc(self::GetClassName());
     106    $Desc->AddReference('DocumentLine', DocumentLine::GetClassName());
    106107    $Desc->AddString('Name');
    107108    return $Desc;
     
    113114  static function GetDesc(): ModelDesc
    114115  {
    115     $Desc = new ModelDesc('DocumentLineSequence');
    116     $Desc->AddReference('DocumentLine', 'DocumentLine');
    117     $Desc->AddReference('FinanceYear', 'FinanceYear');
     116    $Desc = new ModelDesc(self::GetClassName());
     117    $Desc->AddReference('DocumentLine', DocumentLine::GetClassName());
     118    $Desc->AddReference('FinanceYear', FinanceYear::GetClassName());
    118119    $Desc->AddInteger('NextNumber');
    119120    $Desc->AddString('YearPrefix');
     
    126127  static function GetDesc(): ModelDesc
    127128  {
    128     $Desc = new ModelDesc('FinanceYear');
     129    $Desc = new ModelDesc(self::GetClassName());
    129130    $Desc->AddInteger('Year');
    130131    $Desc->AddDate('DateStart');
Note: See TracChangeset for help on using the changeset viewer.