Functions

Get form elements

__vimbadmin_getFormElements(\OSS_Form $formObj, array $validationRules) : void
category OSS
package OSS_Smarty
subpackage Functions

Parameters

$formObj

\OSS_Form

Form to get elements

$validationRules

array

&$validationRules Array of rules for validate elements

Function to generate a login form based on a ZendForm object.

smarty_function_LoginForm(array $params, \Smarty $smarty) : string
category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

array

$smarty

\Smarty

A reference to the Smarty template object

Returns

string

Function to display OSS_Message for user

smarty_function_OSS_Message(array $params, \Smarty $smarty) : string
category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

array

$smarty

\Smarty

A reference to the Smarty template object

Returns

string

Function to add the JQuery form validator to a form.

smarty_function_addJSValidator(array $params, \Smarty $smarty) : string

the parameters in $params are:

'form' - the form object, must be a Zend_Form or an inherited class of that

category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

array

An array of the parameters to make up the URL

$smarty

\Smarty

A reference to the Smarty template object

Returns

string

Function to generate a currency string from a string, int or float

smarty_function_currency(array $params, \Smarty $smarty) : string

parameters: 'value' string, int, float, default 0.00 'currency' string, default '€'

category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

array

$smarty

\Smarty

A reference to the Smarty template object

Returns

string

Function to generate a custom date string using date( 'format', strtotime( 'offset', now ) )

smarty_function_customdate(array $params, \Smarty $smarty) : string

parameters: 'format' string, default 'Y-m-d' 'offset' string, default 'now' 'now' string, default time()

category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

array

$smarty

\Smarty

A reference to the Smarty template object

Returns

string

Function to to calculate diffrence between two days

smarty_function_dateDiffDays(array $params, \Smarty $smarty) : string

parameters: 'date1' string, default 'Y-m-d' 'date2' string, default 'Y-m-d'

category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

array

$smarty

\Smarty

A reference to the Smarty template object

Returns

string

Function to load and display dynamic content from the database.

smarty_function_dynamicContent(array $params, \Smarty $smarty) : string

The URL is made up of parameters as supplied in the $params associative array. 'controller' and 'action' are special parameters which indicate the controller and action to call. Any other parameters are added as additional name / value pairs.

NOTICE: Works with Doctrine1

category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

array

An array of the parameters to make up the URL

$smarty

\Smarty

A reference to the Smarty template object

Returns

string

Function to generate a Zend Controller URL from Smarty templates.

smarty_function_genUrl(array $params, \Smarty $smarty) : string

The URL is made up of parameters as supplied in the $params associative array. 'module', 'controller' and 'action' are special parameters which indicate the module, controller and action to call. Any other parameters are added as additional name / value pairs.

Calls OSS_Utils::genUrl()

category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

array

An array of the parameters to make up the URL

$smarty

\Smarty

A reference to the Smarty object

Returns

string

Smarty plugin Purpose: Similar with "include" function, but only include the template file when it exists.

smarty_function_includeIfExists($params, $smarty) : string

Otherwise, a default file passed by parameter "else" will be included. Example: 1 {includeIfExists file="foo.tpl" assign="foo"}

2 {includeIfExists file="foo.tpl" else="default.tpl"}

category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

$smarty

Returns

string

Function to execute a model method with (optional) parameters

smarty_function_modelOperation(array $params, \Smarty $smarty) : mixed

NOTICE: Works only with Doctrine1

category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

array

(model, id, method, params)

$smarty

\Smarty

A reference to the Smarty template object

Returns

mixed

Function to execute the PHP native phpinfo() function

smarty_function_phpinfo(array $params, \Smarty $smarty) : string
category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

array

An array of the parameters to make up the URL

$smarty

\Smarty

A reference to the Smarty object

Returns

string

Function converts given int to time string assuming that hours can be more than 24.

smarty_function_secondsToHMS($params, $smarty) : string
category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

$smarty

Returns

string

Function icludes template form skin, if file is not existing in skin folder it displays default one.

smarty_function_tmplinclude($params, $smarty) : string
category OSS
package OSS_Smarty
subpackage Functions

Parameters

$params

$smarty

Returns

string

Functions

Alnum modifier

smarty_modifier_alnum(string $string) : string
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$string

string

Strint to modify

Returns

string

Smarty debug_print_var modifier plugin

smarty_modifier_debug_print_var($var, $depth, $length) : string

Type: modifier
Name: debug_print_var
Purpose: formats variable contents for display in the console

link debug_print_var (Smarty online manual)
author Monte Ohrt
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$var

array|object

$depth

integer

$length

integer

Returns

string

Smarty escape modifier plugin

smarty_modifier_escape(string $string, \html | \htmlall | \url | \quotes | \hex | \hexentity | \javascript $esc_type, string $char_set) : string

Type: modifier
Name: escape
Purpose: Escape the string according to escapement type

link escape (Smarty online manual)
author Monte Ohrt
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$string

string

$esc_type

\html\htmlall\url\quotes\hex\hexentity\javascript

$char_set

string

Returns

string

International mobile number modifier

smarty_modifier_intlmobile(string $string) : string
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$string

string

Strint to modify

Returns

string

Mobile number modifier

smarty_modifier_mobile(string $string) : string
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$string

string

Strint to modify

Returns

string

OSS_Date modifier

smarty_modifier_ossDate(string $string, string | int $format) : string
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$string

string

String to modify

$format

stringint

Returns

string

Replace by regular expresion modifier

smarty_modifier_preg_replace(string $string, string $search, string $replace) : string
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$string

string

Strint to modify

$search

string

Pattern to search

$replace

string

Replacement string

Returns

string

Shorten modifier

smarty_modifier_shorten(string $string, int $length) : string
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$string

string

Strint to modify

$length

int

Wanted max string length

Returns

string

Size of modifier Counts all elements in an array, or something in an object.

smarty_modifier_sizeof(mixed $input) : int
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$input

mixed

Returns

int

Smarty string_format modifier plugin

smarty_modifier_string_format($string, $format) : string

Type: modifier
Name: string_format
Purpose: format strings via sprintf

link string_format (Smarty online manual)
author Monte Ohrt
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$string

string

$format

string

Returns

string

To int modifier Multicasting given string to int

smarty_modifier_toInt(string $string) : int
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$string

string

Returns

int

To valid id

smarty_modifier_toValidId(string $string) : string
category OSS
package OSS_Smarty
subpackage Modifier

Parameters

$string

string

Returns

string