Ignore:
Timestamp:
Feb 17, 2021, 12:30:23 PM (4 years ago)
Author:
chronos
Message:
File:
1 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}
Note: See TracChangeset for help on using the changeset viewer.