Changeset 899 for trunk/Modules/Notify/Notify.php
- Timestamp:
- Feb 17, 2021, 12:30:23 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Notify/Notify.php
r894 r899 3 3 define('CONTACT_CATEGORY_EMAIL', 4); 4 4 5 class ModuleNotify extends AppModule5 class ModuleNotify extends Module 6 6 { 7 7 public array $Checks; … … 13 13 $this->Version = '1.0'; 14 14 $this->Creator = 'Chronos'; 15 $this->License = 'GNU/GPL ';15 $this->License = 'GNU/GPLv3'; 16 16 $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 18 20 $this->Checks = array(); 19 21 } … … 128 130 } 129 131 130 function GetModels(): array131 {132 return array(NotifyCategory::GetClassName(), NotifyUser::GetClassName());133 }134 135 132 function DoInstall(): void 136 133 { … … 176 173 } 177 174 178 static function Cast( AppModule $AppModule): ModuleNotify179 { 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)); 185 182 } 186 183 } … … 188 185 class NotifyCategory extends Model 189 186 { 190 static function Get Desc(): ModelDesc187 static function GetModelDesc(): ModelDesc 191 188 { 192 189 $Desc = new ModelDesc(self::GetClassName()); … … 199 196 class NotifyUser extends Model 200 197 { 201 static function Get Desc(): ModelDesc198 static function GetModelDesc(): ModelDesc 202 199 { 203 200 $Desc = new ModelDesc(self::GetClassName());
Note:
See TracChangeset
for help on using the changeset viewer.