Changeset 899 for trunk/Modules/User/User.php
- Timestamp:
- Feb 17, 2021, 12:30:23 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/User.php
r896 r899 5 5 include_once(dirname(__FILE__).'/UserPage.php'); 6 6 7 class ModuleUser extends AppModule7 class ModuleUser extends Module 8 8 { 9 9 public array $UserPanel; … … 18 18 $this->License = 'GNU/GPLv3'; 19 19 $this->Description = 'User management'; 20 $this->Dependencies = array(); 20 $this->Models = array(User::GetClassName(), UserOnline::GetClassName(), PermissionGroup::GetClassName(), PermissionOperation::GetClassName(), 21 PermissionGroupAssignment::GetClassName(), PermissionUserAssignment::GetClassName()); 22 21 23 $this->UserPanel = array(); 22 24 $this->User = new User($System); 23 }24 25 function GetModels(): array26 {27 return array(User::GetClassName(), UserOnline::GetClassName(), PermissionGroup::GetClassName(), PermissionOperation::GetClassName(),28 PermissionGroupAssignment::GetClassName(), PermissionUserAssignment::GetClassName());29 25 } 30 26 … … 208 204 } 209 205 210 static function Cast( AppModule $AppModule): ModuleUser211 { 212 if ($ AppModule instanceof ModuleUser)206 static function Cast(Module $Module): ModuleUser 207 { 208 if ($Module instanceof ModuleUser) 213 209 { 214 return $ AppModule;210 return $Module; 215 211 } 216 throw new Exception('Expected ModuleUser type but got '.gettype($ AppModule));212 throw new Exception('Expected ModuleUser type but got '.gettype($Module)); 217 213 } 218 214 }
Note:
See TracChangeset
for help on using the changeset viewer.