ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilChatroomObjectDefinition Class Reference
+ Collaboration diagram for ilChatroomObjectDefinition:

Public Member Functions

 __construct ($moduleName, $moduleBasePath, $relativeClassPath='classes', $guiScope='')
 Sets class parameters using given parameters. More...
 
 hasGUI ($gui)
 Returns true if file exists. More...
 
 getGUIPath ($gui)
 Builds gui path using given $gui and returns it. More...
 
 getGUIClassName ($gui)
 Builds gui classname using given $gui and returns it. More...
 
 loadGUI ($gui)
 Requires file, whereby given $gui is used as parameter in getGUIPath method to build the filename of the file to required. More...
 
 buildGUI ($gui, ilChatroomObjectGUI $chatroomObjectGUI)
 Builds and returns new gui using given $gui and $gui. More...
 

Static Public Member Functions

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

Private Attributes

 $moduleName
 
 $moduleBasePath
 
 $relativeClassPath
 
 $guiScope
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Sets class parameters using given parameters.

Parameters
string$moduleName
string$moduleBasePath
string$relativeClassPathOptional.
string$guiScopeOptional.

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

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

42  {
43  $this->moduleName = $moduleName;
44  $this->moduleBasePath = rtrim($moduleBasePath, '/\\');
45  $this->relativeClassPath = rtrim($relativeClassPath);
46  $this->guiScope = rtrim($guiScope);
47  }

Member Function Documentation

◆ buildGUI()

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

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

Parameters
string$gui
ilChatroomObjectGUI$chatroomObjectGUI
Returns
ilChatroomGUIHandler

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

References getGUIClassName().

126  {
127  $className = $this->getGUIClassName($gui);
128  $guiInstance = new $className($chatroomObjectGUI);
129 
130  return $guiInstance;
131  }
getGUIClassName($gui)
Builds gui classname using given $gui and returns it.
+ Here is the call graph for this function:

◆ getDefaultDefinition()

static ilChatroomObjectDefinition::getDefaultDefinition (   $moduleName)
static

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

Parameters
string$moduleName
Returns
ilChatroomObjectDefinition

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

References $moduleName.

Referenced by ilObjChatroomGUI\getObjectDefinition().

56  {
57  $object = new self($moduleName, 'Modules/' . $moduleName . '/');
58 
59  return $object;
60  }
+ Here is the caller graph for this function:

◆ getDefaultDefinitionWithCustomGUIPath()

static ilChatroomObjectDefinition::getDefaultDefinitionWithCustomGUIPath (   $moduleName,
  $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 69 of file class.ilChatroomObjectDefinition.php.

References $guiScope, and $moduleName.

Referenced by ilObjChatroomAdminGUI\getObjectDefinition().

70  {
71  $object = new self(
72  $moduleName, 'Modules/' . $moduleName . '/', 'classes', $guiScope
73  );
74 
75  return $object;
76  }
+ Here is the caller graph for this function:

◆ getGUIClassName()

ilChatroomObjectDefinition::getGUIClassName (   $gui)

Builds gui classname using given $gui and returns it.

Parameters
string$gui
Returns
string

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

Referenced by buildGUI(), and getGUIPath().

105  {
106  return 'il' . $this->moduleName . ucfirst($this->guiScope) . ucfirst($gui) . 'GUI';
107  }
+ Here is the caller graph for this function:

◆ getGUIPath()

ilChatroomObjectDefinition::getGUIPath (   $gui)

Builds gui path using given $gui and returns it.

Parameters
string$gui
Returns
string

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

References getGUIClassName().

Referenced by hasGUI(), and loadGUI().

94  {
95  return $this->moduleBasePath . '/' . $this->relativeClassPath . '/' .
96  $this->guiScope . 'gui/class.' . $this->getGUIClassName($gui) . '.php';
97  }
getGUIClassName($gui)
Builds gui classname using given $gui and returns it.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasGUI()

ilChatroomObjectDefinition::hasGUI (   $gui)

Returns true if file exists.

Parameters
string$gui
Returns
boolean

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

References getGUIPath().

84  {
85  return file_exists($this->getGUIPath($gui));
86  }
getGUIPath($gui)
Builds gui path using given $gui and returns it.
+ Here is the call graph for this function:

◆ loadGUI()

ilChatroomObjectDefinition::loadGUI (   $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 114 of file class.ilChatroomObjectDefinition.php.

References getGUIPath().

115  {
116  require_once $this->getGUIPath($gui);
117  }
getGUIPath($gui)
Builds gui path using given $gui and returns it.
+ Here is the call graph for this function:

Field Documentation

◆ $guiScope

ilChatroomObjectDefinition::$guiScope
private

◆ $moduleBasePath

ilChatroomObjectDefinition::$moduleBasePath
private

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

Referenced by __construct().

◆ $moduleName

ilChatroomObjectDefinition::$moduleName
private

◆ $relativeClassPath

ilChatroomObjectDefinition::$relativeClassPath
private

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

Referenced by __construct().


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