Changeset 899 for trunk/Modules/User


Ignore:
Timestamp:
Feb 17, 2021, 12:30:23 PM (4 years ago)
Author:
chronos
Message:
Location:
trunk/Modules/User
Files:
2 edited

Legend:

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

    r896 r899  
    55include_once(dirname(__FILE__).'/UserPage.php');
    66
    7 class ModuleUser extends AppModule
     7class ModuleUser extends Module
    88{
    99  public array $UserPanel;
     
    1818    $this->License = 'GNU/GPLv3';
    1919    $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
    2123    $this->UserPanel = array();
    2224    $this->User = new User($System);
    23   }
    24 
    25   function GetModels(): array
    26   {
    27     return array(User::GetClassName(), UserOnline::GetClassName(), PermissionGroup::GetClassName(), PermissionOperation::GetClassName(),
    28       PermissionGroupAssignment::GetClassName(), PermissionUserAssignment::GetClassName());
    2925  }
    3026
     
    208204  }
    209205
    210   static function Cast(AppModule $AppModule): ModuleUser
    211   {
    212     if ($AppModule instanceof ModuleUser)
     206  static function Cast(Module $Module): ModuleUser
     207  {
     208    if ($Module instanceof ModuleUser)
    213209    {
    214       return $AppModule;
     210      return $Module;
    215211    }
    216     throw new Exception('Expected ModuleUser type but got '.gettype($AppModule));
     212    throw new Exception('Expected ModuleUser type but got '.gettype($Module));
    217213  }
    218214}
  • trunk/Modules/User/UserModel.php

    r897 r899  
    6565  }
    6666
    67   static function GetDesc(): ModelDesc
     67  static function GetModelDesc(): ModelDesc
    6868  {
    6969    $Desc = new ModelDesc(self::GetClassName());
     
    461461class UserOnline extends Model
    462462{
    463   static function GetDesc(): ModelDesc
     463  static function GetModelDesc(): ModelDesc
    464464  {
    465465    $Desc = new ModelDesc(self::GetClassName());
     
    480480class PermissionGroup extends Model
    481481{
    482   static function GetDesc(): ModelDesc
     482  static function GetModelDesc(): ModelDesc
    483483  {
    484484    $Desc = new ModelDesc(self::GetClassName());
     
    490490class PermissionGroupAssignment extends Model
    491491{
    492   static function GetDesc(): ModelDesc
     492  static function GetModelDesc(): ModelDesc
    493493  {
    494494    $Desc = new ModelDesc(self::GetClassName());
     
    502502class PermissionOperation extends Model
    503503{
    504   static function GetDesc(): ModelDesc
     504  static function GetModelDesc(): ModelDesc
    505505  {
    506506    $Desc = new ModelDesc(self::GetClassName());
     
    516516class PermissionUserAssignment extends Model
    517517{
    518   static function GetDesc(): ModelDesc
     518  static function GetModelDesc(): ModelDesc
    519519  {
    520520    $Desc = new ModelDesc(self::GetClassName());
Note: See TracChangeset for help on using the changeset viewer.