ModuleUtil
in package
Table of Contents
Properties
- $framework : ContaoFrameworkInterface
Methods
- __construct() : mixed
- getClassByModule() : bool
- Get the class name of a given module.
- getModuleClass() : string
- Get the full qualified class name for a given module.
- getModulesByType() : Collection
- isSubModuleOf() : bool
- Check whether a module is a sub module of another.
Properties
$framework
private
ContaoFrameworkInterface
$framework
Methods
__construct()
public
__construct(ContaoFrameworkInterface $framework) : mixed
Parameters
- $framework : ContaoFrameworkInterface
getClassByModule()
Get the class name of a given module.
public
getClassByModule(mixed $module) : bool
Parameters
- $module : mixed
-
Module as module type string, module model object or module object
Return values
boolgetModuleClass()
Get the full qualified class name for a given module.
public
getModuleClass(ModuleModel|Module|string $module) : string
Parameters
- $module : ModuleModel|Module|string
-
a module object, a module model object, a full qualified model class name or model type
Return values
stringgetModulesByType()
public
getModulesByType(string $type[, array<string|int, mixed> $options = [] ]) : Collection
Parameters
- $type : string
- $options : array<string|int, mixed> = []
Return values
CollectionisSubModuleOf()
Check whether a module is a sub module of another.
public
isSubModuleOf(mixed $module1, mixed $module2[, bool $trueIfSame = false ]) : bool
Parameters
- $module1 : mixed
-
First module as class string, module type string, module model object or module object
- $module2 : mixed
-
Second module as class string, module type string, module model object or module object
- $trueIfSame : bool = false
-
Return true if $module1 and $module2 are the same