PHP 클래스 Backend\Core\Engine\DataGridFunctions

파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$dataGridUsers

공개 메소드들

메소드 설명
cleanupPlainText ( string $var ) : string Formats plain text as HTML, links will be detected, paragraphs will be inserted
formatFloat ( float $number, integer $decimals = 2 ) : string Format a number as a float
getDate ( integer $timestamp ) : string Format a date according the users' settings
getLongDate ( integer $timestamp ) : string Format a date as a long representation according the users' settings
getTime ( integer $timestamp ) : string Format a time according the users' settings
getTimeAgo ( integer $timestamp ) : string Get time ago as a string for use in a datagrid
getUser ( integer $id ) : string Get the HTML for a user to use in a datagrid
greyOut ( string $type, string $value, array $attributes = [] ) : array This will grey out certain rows from common columns. These columns are:
showBool ( string | boolean $status, boolean $reverse = false ) : string This is an alias for the template modifier since it can also be used here and people didn't find it.
showImage ( string $path, string $image, string $title = '', string $url = null, integer $width = null, integer $height = null ) : string Returns an image tag
truncate ( string $string, integer $length, boolean $useHellip = true ) : string Truncate a string

메소드 상세

cleanupPlainText() 공개 정적인 메소드

Formats plain text as HTML, links will be detected, paragraphs will be inserted
public static cleanupPlainText ( string $var ) : string
$var string The data to cleanup.
리턴 string

formatFloat() 공개 정적인 메소드

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

getDate() 공개 정적인 메소드

Format a date according the users' settings
public static getDate ( integer $timestamp ) : string
$timestamp integer The UNIX-timestamp to format as a human readable date.
리턴 string

getLongDate() 공개 정적인 메소드

Format a date as a long representation according the users' settings
public static getLongDate ( integer $timestamp ) : string
$timestamp integer The UNIX-timestamp to format as a human readable date.
리턴 string

getTime() 공개 정적인 메소드

Format a time according the users' settings
public static getTime ( integer $timestamp ) : string
$timestamp integer The UNIX-timestamp to format as a human readable time.
리턴 string

getTimeAgo() 공개 정적인 메소드

Get time ago as a string for use in a datagrid
public static getTimeAgo ( integer $timestamp ) : string
$timestamp integer The UNIX-timestamp to convert in a time-ago-string.
리턴 string

getUser() 공개 정적인 메소드

Get the HTML for a user to use in a datagrid
public static getUser ( integer $id ) : string
$id integer The Id of the user.
리턴 string

greyOut() 공개 정적인 메소드

'visible', 'hidden', 'active', 'published'
public static greyOut ( string $type, string $value, array $attributes = [] ) : array
$type string The type of column. This is given since some columns can have different meanings than others.
$value string
$attributes array
리턴 array

showBool() 공개 정적인 메소드

This is an alias for the template modifier since it can also be used here and people didn't find it.
public static showBool ( string | boolean $status, boolean $reverse = false ) : string
$status string | boolean
$reverse boolean show the opposite of the status
리턴 string

showImage() 공개 정적인 메소드

Returns an image tag
public static showImage ( string $path, string $image, string $title = '', string $url = null, integer $width = null, integer $height = null ) : string
$path string The path to the image.
$image string The filename of the image.
$title string The title (will be used as alt).
$url string The url
$width integer The width for the
$height integer The height for the
리턴 string

truncate() 공개 정적인 메소드

Truncate a string
public static truncate ( string $string, integer $length, boolean $useHellip = true ) : string
$string string The string to truncate.
$length integer The maximumlength for the string.
$useHellip boolean Should a hellip be appended?
리턴 string

프로퍼티 상세

$dataGridUsers 보호되어 있는 정적으로 프로퍼티

protected static $dataGridUsers