Bitrix API

UI

Table of Contents

Methods

checkDateTime()  : bool|int
Checks if a argument is a legal time string
convertActionPathToBarNotation()  : string
Converts placeholders in #PLACEHOLDER# into {{PLACEHOLDER}} notation by using mapping
convertBBCodeToHtml()  : string
Use when you need to display bbcode-d text as (safe) html
convertBBCodeToHtmlSimple()  : mixed
convertHtmlToBBCode()  : mixed
convertHtmlToSafeHtml()  : string
Use when you need to make your html a little safer
formatDateTime()  : string
Converts timestamp into the time string in site format without any additional decorations
formatDateTimeFromDB()  : bool|string
Converts time string from database format into site format: 2016-11-15 15:40:00 => 15.11.2016 15:40:00
formatDateTimeSiteL2S()  : mixed
formatTimeAmount()  : mixed
formatTimezoneOffsetUTC()  : mixed
getAvatar()  : mixed
getAvatarFile()  : mixed
getAvatars()  : array<string|int, mixed>
getDateTimeFormat()  : mixed
getDateTimeFormatShort()  : mixed
getHintState()  : mixed
getHumanDateFormat()  : string
getHumanDateTimeFormat()  : string
getHumanTimeFormat()  : string
getPluralForm()  : mixed
parseDateTime()  : bool|int
Parses date time string. Note: this function wont work with date time formatted with format with additions.
parseTimeAmount()  : int
Function parses time into an amount of seconds. I.e. '100:30' will be parsed to 361800
sanitizeString()  : mixed
toJSObject()  : string
Formats php structure into Javascript object format (application/x-javascript)
toJSON()  : mixed
Formats php structure into JSON format (application/json)
toLowerCaseFirst()  : mixed
translateCalendarSettings()  : mixed

Methods

checkDateTime()

Checks if a argument is a legal time string

public static checkDateTime(mixed $dayTime) : bool|int
Parameters
$dayTime : mixed
Return values
bool|int

convertActionPathToBarNotation()

Converts placeholders in #PLACEHOLDER# into {{PLACEHOLDER}} notation by using mapping

public static convertActionPathToBarNotation(mixed $path[, array<string|int, mixed> $map = array() ]) : string
Parameters
$path : mixed
$map : array<string|int, mixed> = array()
Return values
string

convertBBCodeToHtml()

Use when you need to display bbcode-d text as (safe) html

public static convertBBCodeToHtml(mixed $value[, array<string|int, mixed> $parameters = array() ]) : string
Parameters
$value : mixed
$parameters : array<string|int, mixed> = array()
Return values
string

convertBBCodeToHtmlSimple()

public static convertBBCodeToHtmlSimple(mixed $value) : mixed
Parameters
$value : mixed

convertHtmlToBBCode()

public static convertHtmlToBBCode(mixed $value) : mixed
Parameters
$value : mixed

convertHtmlToSafeHtml()

Use when you need to make your html a little safer

public static convertHtmlToSafeHtml(mixed $value) : string
Parameters
$value : mixed
Return values
string

formatDateTime()

Converts timestamp into the time string in site format without any additional decorations

public static formatDateTime(mixed $stamp[, bool|string $format = false ]) : string

todo: make this function even smarter: detect if $stamp is a unix timestamp or a date string todo: in the last case, provide $fromFormat argument

Parameters
$stamp : mixed
$format : bool|string = false

in php notation

Return values
string

formatDateTimeFromDB()

Converts time string from database format into site format: 2016-11-15 15:40:00 => 15.11.2016 15:40:00

public static formatDateTimeFromDB(mixed $value) : bool|string
Parameters
$value : mixed
Return values
bool|string

formatDateTimeSiteL2S()

public static formatDateTimeSiteL2S(mixed $time) : mixed
Parameters
$time : mixed

formatTimeAmount()

public static formatTimeAmount(mixed $time[, mixed $format = 'HH:MI:SS' ]) : mixed
Parameters
$time : mixed
$format : mixed = 'HH:MI:SS'

formatTimezoneOffsetUTC()

public static formatTimezoneOffsetUTC(mixed $offset) : mixed
Parameters
$offset : mixed

getAvatar()

public static getAvatar(mixed $fileId[, mixed $width = 50 ][, mixed $height = 50 ][, mixed $immediate = false ]) : mixed
Parameters
$fileId : mixed
$width : mixed = 50
$height : mixed = 50
$immediate : mixed = false

getAvatarFile()

public static getAvatarFile(mixed $fileId[, array<string|int, mixed> $parameters = array('WIDTH' => 50, 'HEIGHT' => 50) ]) : mixed
Parameters
$fileId : mixed
$parameters : array<string|int, mixed> = array('WIDTH' => 50, 'HEIGHT' => 50)

getAvatars()

public static getAvatars(array<string|int, mixed> $fileIds[, int $width = 50 ][, int $height = 50 ][, false $immediate = true ]) : array<string|int, mixed>
Parameters
$fileIds : array<string|int, mixed>
$width : int = 50
$height : int = 50
$immediate : false = true
Return values
array<string|int, mixed>

getDateTimeFormat()

public static getDateTimeFormat() : mixed

getDateTimeFormatShort()

public static getDateTimeFormatShort() : mixed

getHintState()

public static getHintState() : mixed

getHumanDateFormat()

public static getHumanDateFormat(int $timestamp) : string
Parameters
$timestamp : int
Return values
string

getHumanDateTimeFormat()

public static getHumanDateTimeFormat(int $timestamp) : string
Parameters
$timestamp : int
Return values
string

getHumanTimeFormat()

public static getHumanTimeFormat(int $timestamp) : string
Parameters
$timestamp : int
Return values
string

getPluralForm()

public static getPluralForm(mixed $n) : mixed
Parameters
$n : mixed

parseDateTime()

Parses date time string. Note: this function wont work with date time formatted with format with additions.

public static parseDateTime(mixed $dayTime) : bool|int
Parameters
$dayTime : mixed
Return values
bool|int

parseTimeAmount()

Function parses time into an amount of seconds. I.e. '100:30' will be parsed to 361800

public static parseTimeAmount(mixed $time[, mixed $format = 'HH:MI:SS' ]) : int
Parameters
$time : mixed
$format : mixed = 'HH:MI:SS'
Tags
access

private

Return values
int

sanitizeString()

public static sanitizeString(mixed $string[, array<string|int, mixed> $allowedTags = array() ]) : mixed
Parameters
$string : mixed
$allowedTags : array<string|int, mixed> = array()

toJSObject()

Formats php structure into Javascript object format (application/x-javascript)

public static toJSObject(mixed $data) : string

Note: CUtil::PhpToJSObject() translates php nulls to js empty strings, which is not correct

Parameters
$data : mixed
Return values
string

toJSON()

Formats php structure into JSON format (application/json)

public static toJSON(mixed $data) : mixed
Parameters
$data : mixed

toLowerCaseFirst()

public static toLowerCaseFirst(mixed $str) : mixed
Parameters
$str : mixed

translateCalendarSettings()

public static translateCalendarSettings(array<string|int, mixed> $settings) : mixed
Parameters
$settings : array<string|int, mixed>

        
On this page

Search results