API documentation :: Docs For Class arbitViewTemplateFunctions
Packages:Interfaces:
Classes:
|
Core::View::arbitViewTemplateFunctionsClass arbitViewTemplateFunctionsCustom template helper functions used by the xhtml view handler. Custom template helper functions used by the xhtml view handler.
Member Variables
Method Summary
MethodsformatDate
static string
formatDate(
int
$timestamp
, [string
$format
= 'full'] )
Get formatted date Get formatted date Format given timestamp based on users timezone and a given date format string. The string may either be "user" for the user configured format, or one of the formats, which can be understand by the arbitDateTimeFormatter, which currently are:
Parameters:
getArrayElement
static mixed
getArrayElement(
$array
, int
$element
)
Get element from array Get on element from array, specified by its index position. either use positive number to get the nth element, or negitive numbers to get the nth element from the end of the array, where -1 means the last element in the array. Get element from array Get on element from array, specified by its index position. You may either use positive number to get the nth element, or negitive numbers to get the nth element from the end of the array, where -1 means the last element in the array. Parameters:
getCustomFunctionDefinition
static ezcTemplateCustomFunctionDefinition
getCustomFunctionDefinition(
string
$name
)
Return function definition for function name Return function definition for function name Parameters:
getDiff
static array
getDiff(
mixed
$old
, mixed
$new
, [string
$type
= 'text'] )
Calculate and return diff Calculate and return the diff of the given type for the given input. Calculate and return diff Calculate and return the diff of the given type for the given input. Type may be either 'line', 'array', or 'text', while the method defaults to text diff. The returned array is documented at the repsective diff algorithm implementation and may be slightly different depending on the used algorithm. Parameters:
getFormValues
static array
getFormValues(
$definition
)
Get form values Receive all form values for the current form from the prior request. be used to maintain form values in case of an error. Get form values Receive all form values for the current form from the prior request. Can be used to maintain form values in case of an error. Receives an array with the form value definition, which should look like:
Parameters:
getPathsFromArray
static void
getPathsFromArray(
$array
)
getRecursiveIteratorIterator getRecursiveIteratorIterator Parameters:
getProjectData
static arbitViewProjectModel
getProjectData(
)
Get project data Return the project data for the currently selected project. Get project data Return the project data for the currently selected project. getRecursiveIteratorIterator
static arbitTemplateRecursiveIteratorIterator
getRecursiveIteratorIterator(
$array
)
Return RecursiveIteratorIterator for recursive array Build and return a RecursiveIteratorIterator to iterate over recursive arrays in templates. Return RecursiveIteratorIterator for recursive array Build and return a RecursiveIteratorIterator to iterate over recursive arrays in templates. Parameters:
getTemplatePath
static string
getTemplatePath(
string
$file
)
Get correct template file from path Get correct template file from path Parameters:
getUrl
static string
getUrl(
string
$controller
, [string
$action
= 'index'] , [string
$subaction
= null] , [
$parameters
= array()] )
Get a absolute URL from request configuration Builds an absolute URL for inclusion in your tempaltes mapping the given request configuration. Get a absolute URL from request configuration Builds an absolute URL for inclusion in your tempaltes mapping the given request configuration. Parameters:
showTranslateable
static string
showTranslateable(
arbitTranslateable
$object
)
Show a translateable object Display a translateable object, which usually means it should be translated accordingly to the currently set language, which is not yet implemented. Show a translateable object Display a translateable object, which usually means it should be translated accordingly to the currently set language, which is not yet implemented. Parameters:
stripNonPrintable
static string
stripNonPrintable(
string
$string
)
Strip non printable characters from string Returns a string with all non-printable characters stripped from the string. Strip non printable characters from string Returns a string with all non-printable characters stripped from the string. Parameters:
tabsToSpaces
static string
tabsToSpaces(
string
$string
, [int
$tabWidth
= 8] )
Converts tabs to spaces Converts tabs to spaces Returns a string with all leading tabs characters converted to $tabWidth spaces and other tab chars converted to one space Parameters:
translate
static string
translate(
string
$text
, [
$params
= array()] , [string
$context
= null] , [string
$comment
= null] )
Translate a string Translates a given string with replaced values, just like the tr template block. possible. to statically extract translation strings. whenever possible. Translate a string Translates a given string with replaced values, just like the tr template block. This template function should be used as seldom as possible. Its results are not cached statically and it is not possible to statically extract translation strings. Use the template block whenever possible. Parameters:
varDump
static array
varDump(
mixed
$var
)
Variable dumper Simple wrapper around PHPs var_dump(), which implements recursion detection, as opposed to the default template debug function. Variable dumper Simple wrapper around PHPs var_dump(), which implements recursion detection, as opposed to the default template debug function. Parameters:
Documentation generated on Mon, 05 Apr 2010 14:01:56 +0200 by phpDocumentor 1.4.3
|