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

Legend:

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

    r888 r894  
    1414  }
    1515
    16   function DoInstall(): void
     16  function GetModels(): array
    1717  {
    18   }
    19 
    20   function DoUnInstall(): void
    21   {
     18    return array('Log');
    2219  }
    2320
     
    4138      'Channel' => 'log', 'Callback' => array($this, 'ShowRSS'),
    4239      'Permission' => array('Module' => 'Log', 'Operation' => 'RSS')));
    43   }
    44 
    45   function DoStop(): void
    46   {
    4740  }
    4841
     
    107100  }
    108101}
     102
     103class Log extends Model
     104{
     105  static function GetDesc(): ModelDesc
     106  {
     107    $Desc = new ModelDesc(self::GetClassName());
     108    $Desc->AddDateTime('Time');
     109    $Desc->AddReference('User', User::GetClassName());
     110    $Desc->AddString('Module');
     111    $Desc->AddString('Operation');
     112    $Desc->AddText('Value');
     113    $Desc->AddString('IPAddress');
     114    return $Desc;
     115  }
     116}
Note: See TracChangeset for help on using the changeset viewer.