Ignore:
Timestamp:
Feb 17, 2021, 12:30:23 PM (4 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

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

    r894 r899  
    845845class Menu extends Model
    846846{
    847   static function GetDesc(): ModelDesc
     847  static function GetModelDesc(): ModelDesc
    848848  {
    849849    $Desc = new ModelDesc(self::GetClassName());
     
    855855class MenuItem extends Model
    856856{
    857   static function GetDesc(): ModelDesc
     857  static function GetModelDesc(): ModelDesc
    858858  {
    859859    $Desc = new ModelDesc(self::GetClassName());
     
    868868class MenuItemFavorite extends Model
    869869{
    870   static function GetDesc(): ModelDesc
     870  static function GetModelDesc(): ModelDesc
    871871  {
    872872    $Desc = new ModelDesc(self::GetClassName());
     
    877877}
    878878
    879 class ModuleIS extends AppModule
     879class ModuleIS extends Module
    880880{
    881881  public array $DashboardItems;
     
    890890    $this->License = 'GNU/GPLv3';
    891891    $this->Description = 'User interface for generic information system';
    892     $this->Dependencies = array('User');
     892    $this->Dependencies = array(ModuleUser::GetName());
     893    $this->Models = array(Menu::GetClassName(), MenuItem::GetClassName(), MenuItemFavorite::GetClassName());
    893894
    894895    $this->DashboardItems = array();
    895   }
    896 
    897   function GetModels(): array
    898   {
    899     return array(Menu::GetClassName(), MenuItem::GetClassName(), MenuItemFavorite::GetClassName());
    900896  }
    901897
     
    956952  }
    957953
    958   static function Cast(AppModule $AppModule): ModuleIS
    959   {
    960     if ($AppModule instanceof ModuleIS)
    961     {
    962       return $AppModule;
    963     }
    964     throw new Exception('Expected ModuleIS type but '.gettype($AppModule));
     954  static function Cast(Module $Module): ModuleIS
     955  {
     956    if ($Module instanceof ModuleIS)
     957    {
     958      return $Module;
     959    }
     960    throw new Exception('Expected ModuleIS type but '.gettype($Module));
    965961  }
    966962}
Note: See TracChangeset for help on using the changeset viewer.