Changeset 899 for trunk/Modules/User
- Timestamp:
- Feb 17, 2021, 12:30:23 PM (4 years ago)
- Location:
- trunk/Modules/User
- Files:
-
- 2 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 } -
trunk/Modules/User/UserModel.php
r897 r899 65 65 } 66 66 67 static function Get Desc(): ModelDesc67 static function GetModelDesc(): ModelDesc 68 68 { 69 69 $Desc = new ModelDesc(self::GetClassName()); … … 461 461 class UserOnline extends Model 462 462 { 463 static function Get Desc(): ModelDesc463 static function GetModelDesc(): ModelDesc 464 464 { 465 465 $Desc = new ModelDesc(self::GetClassName()); … … 480 480 class PermissionGroup extends Model 481 481 { 482 static function Get Desc(): ModelDesc482 static function GetModelDesc(): ModelDesc 483 483 { 484 484 $Desc = new ModelDesc(self::GetClassName()); … … 490 490 class PermissionGroupAssignment extends Model 491 491 { 492 static function Get Desc(): ModelDesc492 static function GetModelDesc(): ModelDesc 493 493 { 494 494 $Desc = new ModelDesc(self::GetClassName()); … … 502 502 class PermissionOperation extends Model 503 503 { 504 static function Get Desc(): ModelDesc504 static function GetModelDesc(): ModelDesc 505 505 { 506 506 $Desc = new ModelDesc(self::GetClassName()); … … 516 516 class PermissionUserAssignment extends Model 517 517 { 518 static function Get Desc(): ModelDesc518 static function GetModelDesc(): ModelDesc 519 519 { 520 520 $Desc = new ModelDesc(self::GetClassName());
Note:
See TracChangeset
for help on using the changeset viewer.