19 declare(strict_types=1);
49 private readonly
string $moduleName,
50 string $moduleBasePath,
51 string $relativeClassPath =
'classes',
54 $this->moduleBasePath = rtrim($moduleBasePath,
'/\\');
55 $this->relativeClassPath = rtrim($relativeClassPath);
56 $this->guiScope = rtrim($guiScope);
65 return new self($moduleName,
'Modules/' . $moduleName .
'/');
77 'Modules/' . $moduleName .
'/',
86 public function hasGUI(
string $gui): bool
97 $this->moduleBasePath .
'/' .
98 $this->relativeClassPath .
'/' .
108 return 'il' . $this->moduleName . ucfirst($this->guiScope) . ucfirst($gui) .
'GUI';
126 return new $className($chatroomObjectGUI);
loadGUI(string $gui)
Requires file, whereby given $gui is used as parameter in getGUIPath method to build the filename of ...
readonly string $relativeClassPath
getGUIPath(string $gui)
Builds gui path using given $gui and returns it.
readonly string $moduleBasePath
static getDefaultDefinitionWithCustomGUIPath(string $moduleName, string $guiScope='')
Returns an Instance of ilChatroomObjectDefinition, using given $moduleName and $guiScope as parameter...
__construct(private readonly string $moduleName, string $moduleBasePath, string $relativeClassPath='classes', string $guiScope='')
hasGUI(string $gui)
Returns true if file exists.
Class ilChatroomGUIHandler.
static getDefaultDefinition(string $moduleName)
Returns an Instance of ilChatroomObjectDefinition, using given $moduleName as parameter.
buildGUI(string $gui, ilChatroomObjectGUI $chatroomObjectGUI)
Builds and returns new gui using given $gui and $gui.
getGUIClassName(string $gui)
Builds gui classname using given $gui and returns it.
readonly string $guiScope