viewHelper

General helper class for generating views.

package

Default

Methods

disableLogging deactivate default logging in HTML if we don't produce HTML

disableHtmlLogging() : void
static

Usage: disableLogging()

author

Menno Dekker

Deactivate script but show it for debuging This only filter script tag

filterScript(string $sHtml) : string
static
todo

: filter inline javascript (onclick etc ..., but don't filter EM javascript) Maybe doing it directly in LEM->GetLastPrettyPrintExpression();

author

Denis Chenu

Arguments

$sHtml

string

Response

string

Return a string fixed according to option

flatEllipsizeText(string $sString, boolean $bFlat = true, integer $iAbbreviated, string $sEllipsis = '...', integer $fPosition = 1) : string
static

Arguments

$sString

string

:the string

$bFlat

boolean

: flattenText or not : completely flat (not like flattenText from common_helper)

$iAbbreviated

integer

: max string text (if true : allways flat), 0 or false : don't abbreviated

$sEllipsis

string

if abbreviated : the char to put at end (or middle)

$fPosition

integer

if abbreviated position to split (in % : 0 to 1)

Response

string

getFieldCode returns complete field information code.

getFieldCode(array $aField, array $aOption = array()) : string
static

Usage: getFieldCode($aField, $aOption)

Arguments

$aField

array

the field information from createFieldMap

$aOption

array

option for filtering

Response

string

getFieldText returns complete field information text.

getFieldText(array $aField, array $aOption = array()) : string
static

Usage: getFieldText($aField, $aOption)

Arguments

$aField

array

the field information from createFieldMap

$aOption

array

option (see default)

Response

string

NOTE: A real class helper is needed for twig, so I used this one for now.

getLanguageData( $bOrderByNative = false,  $sLanguageCode = 'en') 
static

TODO: convert surveytranslator to a real helper

Arguments

$bOrderByNative

$sLanguageCode

Get a tag to help automated tests identify pages

getViewTestTag(string $name) : string
static

Arguments

$name

string

unique view name

Response

string

Show purified html

purified(string $sHtml) : string
static

Arguments

$sHtml

string

Response

string

Return a string with the good separator before and after

putSeparator( $sString,  $separator) 
static

Arguments

$sString

:the string

$separator

Show clean string, leaving ONLY tag for Expression

stripTagsEM( $sHtml) : string
static

Arguments

$sHtml

Response

string