ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
ilChatroomObjectDefinition Class Reference
+ Collaboration diagram for ilChatroomObjectDefinition:

Public Member Functions

 __construct (string $moduleName, string $moduleBasePath, string $relativeClassPath='classes', string $guiScope='')
 
 hasGUI (string $gui)
 Returns true if file exists. More...
 
 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...
 
 loadGUI (string $gui)
 Requires file, whereby given $gui is used as parameter in getGUIPath method to build the filename of the file to required. 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

string $moduleName
 
string $moduleBasePath
 
string $relativeClassPath
 
string $guiScope
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilChatroomObjectDefinition::__construct ( string  $moduleName,
string  $moduleBasePath,
string  $relativeClassPath = 'classes',
string  $guiScope = '' 
)

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

56 {
57 $this->moduleName = $moduleName;
58 $this->moduleBasePath = rtrim($moduleBasePath, '/\\');
59 $this->relativeClassPath = rtrim($relativeClassPath);
60 $this->guiScope = rtrim($guiScope);
61 }

References $guiScope, $moduleBasePath, $moduleName, and $relativeClassPath.

Member Function Documentation

◆ buildGUI()

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

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

Parameters
string$gui
ilChatroomObjectGUI$chatroomObjectGUI
Returns
ilChatroomGUIHandler

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

142 {
143 $className = $this->getGUIClassName($gui);
144 return new $className($chatroomObjectGUI);
145 }
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.

Parameters
string$moduleName
Returns
ilChatroomObjectDefinition

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

69 : self
70 {
71 return new self($moduleName, 'Modules/' . $moduleName . '/');
72 }

References $moduleName.

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$moduleName
string$guiScopeOptional. 'admin' or ''. Default ''
Returns
ilChatroomObjectDefinition

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

81 : self
82 {
83 return new self(
85 'Modules/' . $moduleName . '/',
86 'classes',
88 );
89 }

References $guiScope, and $moduleName.

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.

Parameters
string$gui
Returns
string

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

120 : string
121 {
122 return 'il' . $this->moduleName . ucfirst($this->guiScope) . ucfirst($gui) . 'GUI';
123 }

Referenced by buildGUI(), and getGUIPath().

+ Here is the caller graph for this function:

◆ getGUIPath()

ilChatroomObjectDefinition::getGUIPath ( string  $gui)

Builds gui path using given $gui and returns it.

Parameters
string$gui
Returns
string

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

106 : string
107 {
108 return (
109 $this->moduleBasePath . '/' .
110 $this->relativeClassPath . '/' .
111 $this->guiScope . 'gui/class.' . $this->getGUIClassName($gui) . '.php'
112 );
113 }

References getGUIClassName().

Referenced by hasGUI(), and loadGUI().

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

◆ hasGUI()

ilChatroomObjectDefinition::hasGUI ( string  $gui)

Returns true if file exists.

Parameters
string$gui
Returns
bool

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

96 : bool
97 {
98 return is_file($this->getGUIPath($gui));
99 }
getGUIPath(string $gui)
Builds gui path using given $gui and returns it.

References getGUIPath().

+ Here is the call graph for this function:

◆ loadGUI()

ilChatroomObjectDefinition::loadGUI ( string  $gui)

Requires file, whereby given $gui is used as parameter in getGUIPath method to build the filename of the file to required.

Parameters
string$gui

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

130 : void
131 {
132 require_once $this->getGUIPath($gui);
133 }

References getGUIPath().

+ Here is the call graph for this function:

Field Documentation

◆ $guiScope

string ilChatroomObjectDefinition::$guiScope
private

◆ $moduleBasePath

string ilChatroomObjectDefinition::$moduleBasePath
private

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

Referenced by __construct().

◆ $moduleName

string ilChatroomObjectDefinition::$moduleName
private

◆ $relativeClassPath

string ilChatroomObjectDefinition::$relativeClassPath
private

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

Referenced by __construct().


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