\Xima\XmTools\Classes\HelperHelper

Static helper methods, independent of context like TYPO3.

..

Summary

Methods
Properties
Constants
slugify()
slugify2()
slugify3()
translate()
shortenText()
underscoreToCamelCase()
getClassPackageName()
getClassShortName()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
mergeTranslations()
No private properties found
N/A

Methods

slugify()

slugify(  $text) 

Modifies a string to remove all non ASCII characters and spaces.

Parameters

$text

slugify2()

slugify2(  $string) 

Parameters

$string

slugify3()

slugify3(  $str,   $replace = array(),   $delimiter = '-') 

Parameters

$str
$replace
$delimiter

translate()

translate(  $objectToTranslate, string  $lang, string  $fallbackLang = '') : mixed

Translate all translatable fields of a stdObject.

Parameters

$objectToTranslate
string $lang
string $fallbackLang

Returns

mixed

shortenText()

shortenText(  $text,   $length,   $glue = '',   $finishString = '...') 

Parameters

$text
$length
$glue
$finishString

underscoreToCamelCase()

underscoreToCamelCase(string  $string, boolean  $first_char_caps = true) : string

Convert strings with underscores into CamelCase.

Parameters

string $string

The string to convert

boolean $first_char_caps

camelCase or CamelCase

Returns

string —

The converted string

getClassPackageName()

getClassPackageName(mixed  $class) : string

Get the package name of a class.

Parameters

mixed $class

Returns

string

getClassShortName()

getClassShortName(mixed  $class) : string

Get the short name of a class (class name without namespace).

Parameters

mixed $class

Returns

string

mergeTranslations()

mergeTranslations(  $object,   $translations) 

Parameters

$object
$translations