ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilChatroomTabGUIFactory Class Reference

Class ilChatroomTabGUIFactory. More...

+ Collaboration diagram for ilChatroomTabGUIFactory:

Static Public Member Functions

static convertUnderscoreCaseToLowerCamelCaseConversion ($value, $upper_case_first=FALSE)
 Convert a value given in underscore case conversion to lower camel case conversion (e.g. More...
 
static convertLowerCamelCaseToUnderscoreCaseConversion ($value)
 Convert a value given in lower camel case conversion to underscore case conversion (e.g. More...
 

Private Member Functions

 getLabel ($tabDefinition, $id)
 Returns label for tab by $tabDefinition or $id. More...
 

Private Attributes

 $gui
 
 $lng
 

Detailed Description

Member Function Documentation

◆ convertLowerCamelCaseToUnderscoreCaseConversion()

static ilChatroomTabGUIFactory::convertLowerCamelCaseToUnderscoreCaseConversion (   $value)
static

Convert a value given in lower camel case conversion to underscore case conversion (e.g.

MyClass to my_class)

Parameters
string$valueValue in lower camel case conversion
Returns
string The value in underscore case conversion

Definition at line 197 of file class.ilChatroomTabGUIFactory.php.

References $config, ilTabsGUI\addSubTab(), ilTabsGUI\addTab(), ilChatroom\checkUserPermissions(), and getLabel().

Referenced by convertUnderscoreCaseToLowerCamelCaseConversion(), and getLabel().

198  {
199  return strtolower(preg_replace('/(.*?)-(.*?)/', '$1_$2', $value));
200  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convertUnderscoreCaseToLowerCamelCaseConversion()

static ilChatroomTabGUIFactory::convertUnderscoreCaseToLowerCamelCaseConversion (   $value,
  $upper_case_first = FALSE 
)
static

Convert a value given in underscore case conversion to lower camel case conversion (e.g.

my_class to MyClass)

Parameters
string$valueValue in underscore case conversion
boolean$upper_case_firstIf TRUE first character in upper case, lower case if FALSE
Returns
string The value in lower camel case conversion

Definition at line 47 of file class.ilChatroomTabGUIFactory.php.

References $config, $ilCtrl, ilObject\_getAllReferences(), ilObject\_getObjectsByType(), array, and convertLowerCamelCaseToUnderscoreCaseConversion().

48  {
49  $tokens = (array)explode('_', $value);
50  $value = '';
51 
52  foreach($tokens as $token)
53  {
54  $value .= ucfirst($token);
55  }
56 
57  if($upper_case_first === FALSE)
58  {
59  $value = strtolower($value, 0, 1) . substr($value, 1);
60  }
61 
62  return $value;
63  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getLabel()

ilChatroomTabGUIFactory::getLabel (   $tabDefinition,
  $id 
)
private

Returns label for tab by $tabDefinition or $id.

Parameters
array$tabDefinition
string$id
Returns
string
Todo:
: $tabDefinition sollte doch stets ein array und $id stets ein string sein, oder? Dann sollte man auch hier typehinten. (array $tabDefinition, string $id)

Definition at line 262 of file class.ilChatroomTabGUIFactory.php.

References $config, $ilCtrl, array, ilChatroom\byObjectId(), and convertLowerCamelCaseToUnderscoreCaseConversion().

Referenced by convertLowerCamelCaseToUnderscoreCaseConversion().

263  {
264  if(isset($tabDefinition['lng']))
265  return $this->lng->txt($tabDefinition['lng']);
266  else
267  return $this->lng->txt($id);
268  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $gui

ilChatroomTabGUIFactory::$gui
private

Definition at line 16 of file class.ilChatroomTabGUIFactory.php.

◆ $lng

ilChatroomTabGUIFactory::$lng
private

Definition at line 21 of file class.ilChatroomTabGUIFactory.php.


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