ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 128 of file class.ilChatroomObjectDefinition.php.

References getGUIClassName().

129  {
130  $className = $this->getGUIClassName($gui);
131  $guiInstance = new $className($chatroomObjectGUI);
132 
133  return $guiInstance;
134  }
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(
73  'Modules/' . $moduleName . '/',
74  'classes',
75  $guiScope
76  );
77 
78  return $object;
79  }
+ 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 107 of file class.ilChatroomObjectDefinition.php.

Referenced by buildGUI(), and getGUIPath().

108  {
109  return 'il' . $this->moduleName . ucfirst($this->guiScope) . ucfirst($gui) . 'GUI';
110  }
+ 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 96 of file class.ilChatroomObjectDefinition.php.

References getGUIClassName().

Referenced by hasGUI(), and loadGUI().

97  {
98  return $this->moduleBasePath . '/' . $this->relativeClassPath . '/' .
99  $this->guiScope . 'gui/class.' . $this->getGUIClassName($gui) . '.php';
100  }
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 86 of file class.ilChatroomObjectDefinition.php.

References getGUIPath().

87  {
88  return file_exists($this->getGUIPath($gui));
89  }
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 117 of file class.ilChatroomObjectDefinition.php.

References getGUIPath().

118  {
119  require_once $this->getGUIPath($gui);
120  }
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: