PHP 클래스 Backend\Core\Engine\TemplateModifiers

저자: Tijs Verkoyen ([email protected])
파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

공개 메소드들

메소드 설명
count ( array $data ) : integer Returns the count of the count of the array.
formatDate ( integer $var ) : string Format a UNIX-timestamp as a date syntax: {{ $var|formatdate }}
formatDateTime ( integer $var ) : string Format a UNIX-timestamp as a date syntax: {{ $var|formatdatetime }}
formatFloat ( float $number, integer $decimals = 2 ) : string Format a number as a float syntax: {$var|formatfloat}
formatNumber ( float $number, integer $decimals = null ) : string Format a number syntax: {{ $string|formatnumber($decimals) }}
formatTime ( integer $var ) : string Format a UNIX-timestamp as a date syntax: {{ $var|formatdate }}
getURL ( string $action = null, string $module = null, string $suffix = null, string $language = null ) : string Convert a var into a URL syntax: {{ geturl:[:] }}
toLabel ( string $value ) : string Convert this string into a well formed label.
truncate ( string $var = null, integer $length, boolean $useHellip = true, boolean $closestWord = false ) : string Truncate a string syntax: {$var|truncate:max-length[:append-hellip][:closest-word]}

메소드 상세

count() 공개 정적인 메소드

Returns the count of the count of the array.
public static count ( array $data ) : integer
$data array
리턴 integer

formatDate() 공개 정적인 메소드

Format a UNIX-timestamp as a date syntax: {{ $var|formatdate }}
public static formatDate ( integer $var ) : string
$var integer The UNIX-timestamp to format.
리턴 string

formatDateTime() 공개 정적인 메소드

Format a UNIX-timestamp as a date syntax: {{ $var|formatdatetime }}
public static formatDateTime ( integer $var ) : string
$var integer The UNIX-timestamp to format.
리턴 string

formatFloat() 공개 정적인 메소드

Format a number as a float syntax: {$var|formatfloat}
public static formatFloat ( float $number, integer $decimals = 2 ) : string
$number float The number to format.
$decimals integer The number of decimals.
리턴 string

formatNumber() 공개 정적인 메소드

Format a number syntax: {{ $string|formatnumber($decimals) }}
public static formatNumber ( float $number, integer $decimals = null ) : string
$number float The number to format.
$decimals integer The number of decimals
리턴 string

formatTime() 공개 정적인 메소드

Format a UNIX-timestamp as a date syntax: {{ $var|formatdate }}
public static formatTime ( integer $var ) : string
$var integer The UNIX-timestamp to format.
리턴 string

getURL() 공개 정적인 메소드

Convert a var into a URL syntax: {{ geturl:[:] }}
public static getURL ( string $action = null, string $module = null, string $suffix = null, string $language = null ) : string
$action string The action to build the URL for.
$module string The module to build the URL for.
$suffix string A string to append.
$language string A language code
리턴 string

toLabel() 공개 정적인 메소드

syntax: {{ var|tolabel }}.
public static toLabel ( string $value ) : string
$value string The value to convert to a label.
리턴 string

truncate() 공개 정적인 메소드

Truncate a string syntax: {$var|truncate:max-length[:append-hellip][:closest-word]}
public static truncate ( string $var = null, integer $length, boolean $useHellip = true, boolean $closestWord = false ) : string
$var string The string passed from the template.
$length integer The maximum length of the truncated string.
$useHellip boolean Should a hellip be appended if the length exceeds the requested length?
$closestWord boolean Truncate on exact length or on closest word?
리턴 string