CUtility
in package
Utility class providing helper methods for module and view resolution.
This is a static utility class that cannot be instantiated.
Table of Contents
Methods
- GetCurrentPluginClass() : string|bool
- Gets the fully qualified class name for a module's controller or model.
- GetCurrentViewElement() : string
- Gets the file path for a view element.
- __construct() : mixed
- Private constructor to prevent instantiation.
Methods
GetCurrentPluginClass()
Gets the fully qualified class name for a module's controller or model.
public
static GetCurrentPluginClass(string $module[, string $class_type = 'Model' ]) : string|bool
Searches in the following order:
- Plugin-specific class
- Core module-specific class
- Base module class
Parameters
- $module : string
-
The module name.
- $class_type : string = 'Model'
-
The class type ('Model' or 'Controller').
Return values
string|bool —The fully qualified class name, or false if not found.
GetCurrentViewElement()
Gets the file path for a view element.
public
static GetCurrentViewElement(string $module, string $full_filename, array<string|int, string> $foldernames) : string
Searches in the following order:
- Plugin-specific module view
- Plugin base module view
- Core module-specific view
- Core base module view
Parameters
- $module : string
-
The module name.
- $full_filename : string
-
The filename to search for.
- $foldernames : array<string|int, string>
-
Array of folder names to search in.
Return values
string —The full path to the view file, or empty string if not found.
__construct()
Private constructor to prevent instantiation.
private
__construct() : mixed