Ignore:
Timestamp:
Jan 4, 2021, 9:55:40 PM (3 years ago)
Author:
chronos
Message:
  • Modified: More work on modules models initialization.
File:
1 edited

Legend:

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

    r891 r893  
    128128  }
    129129
    130   static function GetModels(): array
    131   {
    132     return array(
    133       'NotifyCategory',
    134       'NotifyUser',
    135     );
     130  function GetModels(): array
     131  {
     132    return array('NotifyCategory', 'NotifyUser');
    136133  }
    137134
    138135  function DoInstall(): void
    139136  {
    140     foreach (self::GetModels() as $Model)
    141     {
    142       $this->InstallModel($Model::GetDesc());
    143     }
    144 
    145137    $this->Database->query("INSERT INTO `NotifyCategory` (`Id`, `Name`, `SysName`) VALUES
    146138    (1, 'Dostupnost zařízení (ping)', 'NetworkReachability'),
     
    152144  }
    153145
    154   function DoUninstall(): void
    155   {
    156     foreach (array_reverse(self::GetModels()) as $Model)
    157     {
    158       $this->UninstallModel($Model::GetDesc());
    159     }
    160   }
    161 
    162146  function ShowLogRSS(): string
    163147  {
Note: See TracChangeset for help on using the changeset viewer.