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/Subject/Subject.php

    r893 r894  
    133133  function GetModels(): array
    134134  {
    135     return array('Country', 'Subject', 'ContactCategory', 'Contact');
     135    return array(Country::GetClassName(), Subject::GetClassName(), ContactCategory::GetClassName(),
     136      Contact::GetClassName());
    136137  }
    137138
     
    149150  static function GetDesc(): ModelDesc
    150151  {
    151     $Desc = new ModelDesc('Subject');
     152    $Desc = new ModelDesc(self::GetClassName());
    152153    $Desc->AddString('Name');
    153154    $Desc->AddString('AddressStreet');
    154155    $Desc->AddString('AddressTown');
    155156    $Desc->AddString('AddressPSC');
    156     $Desc->AddReference('AddressCountry', 'Country', true);
     157    $Desc->AddReference('AddressCountry', Country::GetClassName(), true);
    157158    $Desc->AddString('IC');
    158159    $Desc->AddString('DIC');
    159160    $Desc->AddBoolean('PayVAT');
    160     $Desc->AddReference('MapPosition', 'MapPosition', true);
     161    $Desc->AddReference('MapPosition', MapPosition::GetClassName(), true);
    161162    $Desc->AddString('WWW');
    162163    $Desc->AddString('Note');
     
    169170  static function GetDesc(): ModelDesc
    170171  {
    171     $Desc = new ModelDesc('Country');
     172    $Desc = new ModelDesc(self::GetClassName());
    172173    $Desc->AddString('Name');
    173174    return $Desc;
     
    179180  static function GetDesc(): ModelDesc
    180181  {
    181     $Desc = new ModelDesc('Contact');
    182     $Desc->AddReference('Category', 'ContactCategory', true);
     182    $Desc = new ModelDesc(self::GetClassName());
     183    $Desc->AddReference('Category', ContactCategory::GetClassName(), true);
    183184    $Desc->AddString('Value');
    184     $Desc->AddReference('Subject', 'Subject', true);
    185     $Desc->AddReference('User', 'User', true);
     185    $Desc->AddReference('Subject', Subject::GetClassName(), true);
     186    $Desc->AddReference('User', User::GetClassName(), true);
    186187    $Desc->AddString('Description');
    187188    $Desc->AddBoolean('Receive');
     
    194195  static function GetDesc(): ModelDesc
    195196  {
    196     $Desc = new ModelDesc('ContactCategory');
     197    $Desc = new ModelDesc(self::GetClassName());
    197198    $Desc->AddString('Name');
    198199    return $Desc;
Note: See TracChangeset for help on using the changeset viewer.