Support customizing the default (base) class and install class of a module

This commit is contained in:
Kijin Sung 2023-08-11 22:09:26 +09:00
parent 7502b7308b
commit 3241354872
3 changed files with 23 additions and 4 deletions

View file

@ -51,10 +51,11 @@ class ModuleActionParser extends BaseParser
$info->action = new \stdClass;
$info->grant = new \stdClass;
$info->menu = new \stdClass;
$info->error_handlers = [];
$info->event_handlers = [];
$info->classes = [];
$info->namespaces = [];
$info->prefixes = [];
$info->error_handlers = [];
$info->event_handlers = [];
// Parse grants.
foreach ($xml->grants->grant ?: [] as $grant)
@ -242,6 +243,12 @@ class ModuleActionParser extends BaseParser
}
}
// Parse custom classes.
foreach ($xml->classes->class ?: [] as $class)
{
$info->classes[strval($class['type'])] = strval($class['name']);
}
// Parse custom namespaces.
foreach ($xml->namespaces->namespace ?: [] as $namespace)
{