ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilChatroomObjectDefinition Class Reference
+ Collaboration diagram for ilChatroomObjectDefinition:

Public Member Functions

 __construct (private readonly string $moduleName, string $moduleBasePath, string $relativeClassPath='classes', string $guiScope='')
 
 hasGUI (string $gui)
 
 getGUIPath (string $gui)
 Builds gui path using given $gui and returns it. More...
 
 getGUIClassName (string $gui)
 Builds gui classname using given $gui and returns it. More...
 
 buildGUI (string $gui, ilChatroomObjectGUI $chatroomObjectGUI)
 Builds and returns new gui using given $gui and $gui. More...
 

Static Public Member Functions

static getDefaultDefinition (string $moduleName)
 Returns an Instance of ilChatroomObjectDefinition, using given $moduleName as parameter. More...
 
static getDefaultDefinitionWithCustomGUIPath (string $moduleName, string $guiScope='')
 Returns an Instance of ilChatroomObjectDefinition, using given $moduleName and $guiScope as parameters. More...
 

Private Attributes

readonly string $moduleBasePath
 
readonly string $relativeClassPath
 
readonly string $guiScope
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilChatroomObjectDefinition::__construct ( private readonly string  $moduleName,
string  $moduleBasePath,
string  $relativeClassPath = 'classes',
string  $guiScope = '' 
)
Parameters
$moduleNameModule name, defaults to 'Chatroom'

Definition at line 45 of file class.ilChatroomObjectDefinition.php.

53 {
54 $this->moduleBasePath = rtrim($moduleBasePath, '/\\');
55 $this->relativeClassPath = rtrim($relativeClassPath);
56 $this->guiScope = rtrim($guiScope);
57 }

References $guiScope, $moduleBasePath, and $relativeClassPath.

Member Function Documentation

◆ buildGUI()

ilChatroomObjectDefinition::buildGUI ( string  $gui,
ilChatroomObjectGUI  $chatroomObjectGUI 
)

Builds and returns new gui using given $gui and $gui.

Definition at line 114 of file class.ilChatroomObjectDefinition.php.

115 {
116 $className = $this->getGUIClassName($gui);
117 return new $className($chatroomObjectGUI);
118 }
Class ilChatroomGUIHandler.
getGUIClassName(string $gui)
Builds gui classname using given $gui and returns it.

References getGUIClassName().

+ Here is the call graph for this function:

◆ getDefaultDefinition()

static ilChatroomObjectDefinition::getDefaultDefinition ( string  $moduleName)
static

Returns an Instance of ilChatroomObjectDefinition, using given $moduleName as parameter.

Definition at line 63 of file class.ilChatroomObjectDefinition.php.

63 : self
64 {
65 return new self($moduleName, '../components/ILIAS/' . $moduleName . '/');
66 }

Referenced by ilObjChatroomGUI\getObjectDefinition().

+ Here is the caller graph for this function:

◆ getDefaultDefinitionWithCustomGUIPath()

static ilChatroomObjectDefinition::getDefaultDefinitionWithCustomGUIPath ( string  $moduleName,
string  $guiScope = '' 
)
static

Returns an Instance of ilChatroomObjectDefinition, using given $moduleName and $guiScope as parameters.

Parameters
string$guiScopeOptional. 'admin' or ''. Default ''

Definition at line 73 of file class.ilChatroomObjectDefinition.php.

73 : self
74 {
75 return new self(
76 $moduleName,
77 '../components/ILIAS/' . $moduleName . '/',
78 'classes',
80 );
81 }

References $guiScope.

Referenced by ilObjChatroomAdminGUI\getObjectDefinition().

+ Here is the caller graph for this function:

◆ getGUIClassName()

ilChatroomObjectDefinition::getGUIClassName ( string  $gui)

Builds gui classname using given $gui and returns it.

Definition at line 106 of file class.ilChatroomObjectDefinition.php.

106 : string
107 {
108 return 'il' . $this->moduleName . ucfirst($this->guiScope) . ucfirst($gui) . 'GUI';
109 }

Referenced by buildGUI(), getGUIPath(), and hasGUI().

+ Here is the caller graph for this function:

◆ getGUIPath()

ilChatroomObjectDefinition::getGUIPath ( string  $gui)

Builds gui path using given $gui and returns it.

Definition at line 94 of file class.ilChatroomObjectDefinition.php.

94 : string
95 {
96 return (
97 $this->moduleBasePath . '/' .
98 $this->relativeClassPath . '/' .
99 $this->guiScope . 'gui/class.' . $this->getGUIClassName($gui) . '.php'
100 );
101 }

References getGUIClassName().

Referenced by hasGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasGUI()

ilChatroomObjectDefinition::hasGUI ( string  $gui)

Definition at line 83 of file class.ilChatroomObjectDefinition.php.

83 : bool
84 {
85 $path = $this->getGUIPath($gui);
86 $class = $this->getGUIClassName($gui);
87
88 return class_exists($class) && file_exists($path);
89 }
getGUIPath(string $gui)
Builds gui path using given $gui and returns it.
$path
Definition: ltiservices.php:30

References $path, getGUIClassName(), and getGUIPath().

+ Here is the call graph for this function:

Field Documentation

◆ $guiScope

readonly string ilChatroomObjectDefinition::$guiScope
private

◆ $moduleBasePath

readonly string ilChatroomObjectDefinition::$moduleBasePath
private

Definition at line 30 of file class.ilChatroomObjectDefinition.php.

Referenced by __construct().

◆ $relativeClassPath

readonly string ilChatroomObjectDefinition::$relativeClassPath
private

Definition at line 36 of file class.ilChatroomObjectDefinition.php.

Referenced by __construct().


The documentation for this class was generated from the following file: