Ignore:
Timestamp:
Feb 17, 2021, 12:30:23 PM (3 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

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

    r894 r899  
    33define('CONTACT_CATEGORY_EMAIL', 4);
    44
    5 class ModuleNotify extends AppModule
     5class ModuleNotify extends Module
    66{
    77  public array $Checks;
     
    1313    $this->Version = '1.0';
    1414    $this->Creator = 'Chronos';
    15     $this->License = 'GNU/GPL';
     15    $this->License = 'GNU/GPLv3';
    1616    $this->Description = 'Send notification messages to selected users';
    17     $this->Dependencies = array('User', 'RSS');
     17    $this->Dependencies = array(ModuleUser::GetName(), ModuleRSS::GetName());
     18    $this->Models = array(NotifyCategory::GetClassName(), NotifyUser::GetClassName());
     19
    1820    $this->Checks = array();
    1921  }
     
    128130  }
    129131
    130   function GetModels(): array
    131   {
    132     return array(NotifyCategory::GetClassName(), NotifyUser::GetClassName());
    133   }
    134 
    135132  function DoInstall(): void
    136133  {
     
    176173  }
    177174
    178   static function Cast(AppModule $AppModule): ModuleNotify
    179   {
    180     if ($AppModule instanceof ModuleNotify)
    181     {
    182       return $AppModule;
    183     }
    184     throw new Exception('Expected ModuleNotify type but got '.gettype($AppModule));
     175  static function Cast(Module $Module): ModuleNotify
     176  {
     177    if ($Module instanceof ModuleNotify)
     178    {
     179      return $Module;
     180    }
     181    throw new Exception('Expected ModuleNotify type but got '.gettype($Module));
    185182  }
    186183}
     
    188185class NotifyCategory extends Model
    189186{
    190   static function GetDesc(): ModelDesc
     187  static function GetModelDesc(): ModelDesc
    191188  {
    192189    $Desc = new ModelDesc(self::GetClassName());
     
    199196class NotifyUser extends Model
    200197{
    201   static function GetDesc(): ModelDesc
     198  static function GetModelDesc(): ModelDesc
    202199  {
    203200    $Desc = new ModelDesc(self::GetClassName());
Note: See TracChangeset for help on using the changeset viewer.