Class ilChatroomTabFactory.
More...
|
| getLabel ($tabDefinition, $id) |
| Returns label for tab by $tabDefinition or $id. More...
|
|
◆ convertLowerCamelCaseToUnderscoreCaseConversion()
static ilChatroomTabFactory::convertLowerCamelCaseToUnderscoreCaseConversion |
( |
|
$value | ) |
|
|
static |
Convert a value given in lower camel case conversion to underscore case conversion (e.g.
MyClass to my_class)
- Parameters
-
string | $value | Value in lower camel case conversion |
- Returns
- string The value in underscore case conversion
Definition at line 368 of file class.ilChatroomTabFactory.php.
370 return strtolower(preg_replace(
'/(.*?)-(.*?)/',
'$1_$2', $value));
◆ convertUnderscoreCaseToLowerCamelCaseConversion()
static ilChatroomTabFactory::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 | $value | Value in underscore case conversion |
boolean | $upper_case_first | If TRUE first character in upper case, lower case if FALSE |
- Returns
- string The value in lower camel case conversion
Definition at line 379 of file class.ilChatroomTabFactory.php.
381 $tokens = (array)explode(
'_', $value);
384 foreach($tokens as $token)
386 $value .= ucfirst($token);
389 if($upper_case_first === FALSE)
391 $value = strtolower($value, 0, 1) . substr($value, 1);
◆ getLabel()
ilChatroomTabFactory::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 355 of file class.ilChatroomTabFactory.php.
357 if(isset($tabDefinition[
'lng']))
358 return $this->lng->txt($tabDefinition[
'lng']);
360 return $this->lng->txt($id);
◆ $gui
ilChatroomTabFactory::$gui |
|
private |
◆ $lng
ilChatroomTabFactory::$lng |
|
private |
The documentation for this class was generated from the following file: