Class AuxLib
Standalone class with miscellaneous utility functions
public static
|
|
public static
boolean
|
|
public static
|
#
registerTranslationsScript( string $namespace, array $messages, string $translationFile = 'app', string $scriptName = 'passMsgsToClientScript' )
Registers a script which instantiates a dictionary of translations. |
public static
|
#
registerPassVarsToClientScriptScript( string $namespace, array $vars, string $scriptName = 'passVarsToClientScript' )
|
public static
|
#
printTestError( mixed $message )
Used by actions to return JSON encoded array containing error status and error message. Used for testing purposes only. |
public static
|
#
printError( mixed $message )
Used by actions to return JSON encoded array containing error status and error message. |
public static
|
#
printSuccess( mixed $message )
Used by actions to return JSON encoded array containing success status and success message. |
public static
array
|
#
ajaxReturn( boolean $success, string $successMessage, string $errorMessage )
Calls printError or printSuccess depending on the value of $success. |
public static
|
|
public static
|
|
public static
|
#
debugLogHd( mixed $data )
Render a hex dump to the debug log Adapted from: https://stackoverflow.com/a/4225813 |
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public static
mixed
|
|
public static
|
|
public static
|
|
public static
array
|
|
public static
|
|
public static
|
|
public static
array
|
#
dropdownForJson( array $options )
Reformats and translates dropdown arrays to preserve sorting in CJSON::encode() |
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public static
|