Bitrix API

BaseValuable extends Base

AbstractYes

Class BaseValuable

Table of Contents

Constants

FIELDS_COMPONENT_NAME  = 'bitrix:report.visualconstructor.config.fields'

Methods

__construct()  : mixed
Constructor for valuable fields.
addAssets()  : void
Attach js, css, or inline assets to field.
addClass()  : void
Add to class list class string.
addDataAttribute()  : void
addInlineStyle()  : void
Add inline style by key and value.
addJsEventListener()  : $this
Add js event handler to field on some event which fire on $field in first parameter of this function.
getAssets()  : array<string|int, mixed>
getClasses()  : array<string|int, mixed>
getClassName()  : string
getCompatibleViewTypes()  : array<string|int, mixed>
getDataAttribute()  : mixed|null
Get data attribute by key.
getDataAttributes()  : array<string|int, mixed>
getDefaultValue()  : mixed
getForm()  : Form
getId()  : string
getInlineStyle()  : array<string|int, mixed>
getJsEventListeners()  : array<string|int, mixed>
getJsEvents()  : array<string|int, mixed>
getKey()  : string
getLabel()  : string
getName()  : string
getPostfix()  : Base
getPrefix()  : Base
getRenderedClassAttributes()  : string
Convert class list property collection to string for render as html in field element.
getRenderedDataAttributes()  : string
Conver data atttribute property collection to string for render as html in field element.
getRenderedIdAttribute()  : string
Conver id property to string for render as html in element.
getRenderedInlineStyle()  : string
Convert inline style propery collection to string for render as html.
getValue()  : mixed
Return value if exist, or return default value.
getWeight()  : int
isDisplay()  : bool
isDisplayLabel()  : bool
printContent()  : void
Print field html/string ore somthing else printable.
render()  : void
Check is displayable this field, if yes collect all assets, And print content.
setCompatibleViewTypes()  : void
Setter of compatible widget view types.
setDataAttributes()  : void
Set Data attributes by array of pair key => values.
setDefaultValue()  : void
Defaul value setter.
setDisplay()  : void
Setter for display mode.
setForm()  : void
Setter for form context.
setId()  : void
Setter for id.
setInlineStyle()  : void
Setter dor inline style.
setIsDisplayLabel()  : void
Setter for display mode of label of field.
setKey()  : void
Seter for key.
setLabel()  : void
Setter for field label.
setName()  : void
Field name setter.
setPostfix()  : void
Setter for string which render after field content.
setPrefix()  : void
Setter for string which render before field content.
setValue()  : void
Value setter.
setWeight()  : void
Setter for Weight.

Constants

FIELDS_COMPONENT_NAME

public mixed FIELDS_COMPONENT_NAME = 'bitrix:report.visualconstructor.config.fields'

Methods

__construct()

Constructor for valuable fields.

public __construct(string $key) : mixed
Parameters
$key : string

Unique key.

addAssets()

Attach js, css, or inline assets to field.

public addAssets(array<string|int, mixed> $assets) : void
Parameters
$assets : array<string|int, mixed>

Array of assets which attach to field.

addClass()

Add to class list class string.

public addClass(string $class) : void
Parameters
$class : string

Class string.

addDataAttribute()

public addDataAttribute(string $key, string $value) : void
Parameters
$key : string

Key for data attribute. ('role').

$value : string

Value for data attribute. ('widget').

addInlineStyle()

Add inline style by key and value.

public addInlineStyle(string $key, string $value) : void
Parameters
$key : string

Key of inline style. ('background-color').

$value : string

Value Of inline style. ('red').

addJsEventListener()

Add js event handler to field on some event which fire on $field in first parameter of this function.

public addJsEventListener([self|null $field = null ], string $eventKey, array<string|int, mixed> $jsParams) : $this
Parameters
$field : self|null = null

Field which fire event.

$eventKey : string

Event key which listen this field.

$jsParams : array<string|int, mixed>

JS parameters which pass to handler.

Return values
$this

getAssets()

public getAssets() : array<string|int, mixed>
Return values
array<string|int, mixed>

getClasses()

public getClasses() : array<string|int, mixed>
Return values
array<string|int, mixed>

getClassName()

public static getClassName() : string
Return values
string

getCompatibleViewTypes()

public getCompatibleViewTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDataAttribute()

Get data attribute by key.

public getDataAttribute(string $key) : mixed|null
Parameters
$key : string

Key for data attribute which will return.

Return values
mixed|null

getDataAttributes()

public getDataAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getInlineStyle()

public getInlineStyle() : array<string|int, mixed>
Return values
array<string|int, mixed>

getJsEventListeners()

public getJsEventListeners() : array<string|int, mixed>
Return values
array<string|int, mixed>

getJsEvents()

public getJsEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>

getKey()

public getKey() : string
Return values
string

getLabel()

public getLabel() : string
Return values
string

getName()

public getName() : string
Return values
string

getRenderedClassAttributes()

Convert class list property collection to string for render as html in field element.

public getRenderedClassAttributes() : string
Return values
string

getRenderedDataAttributes()

Conver data atttribute property collection to string for render as html in field element.

public getRenderedDataAttributes() : string
Return values
string

getRenderedIdAttribute()

Conver id property to string for render as html in element.

public getRenderedIdAttribute() : string
Return values
string

getRenderedInlineStyle()

Convert inline style propery collection to string for render as html.

public getRenderedInlineStyle() : string
Return values
string

getValue()

Return value if exist, or return default value.

public getValue() : mixed

getWeight()

public getWeight() : int
Return values
int

isDisplay()

public isDisplay() : bool
Return values
bool

isDisplayLabel()

public isDisplayLabel() : bool
Return values
bool

printContent()

Print field html/string ore somthing else printable.

public abstract printContent() : void

render()

Check is displayable this field, if yes collect all assets, And print content.

public render() : void

setCompatibleViewTypes()

Setter of compatible widget view types.

public setCompatibleViewTypes(array<string|int, mixed> $compatibleViewTypes) : void
Parameters
$compatibleViewTypes : array<string|int, mixed>

Compatible widget view type list.

setDataAttributes()

Set Data attributes by array of pair key => values.

public setDataAttributes(array<string|int, mixed> $dataAttributes) : void
Parameters
$dataAttributes : array<string|int, mixed>

Array of pair key=>value.

setDefaultValue()

Defaul value setter.

public setDefaultValue(mixed $defaultValue) : void
Parameters
$defaultValue : mixed

Value which use as default.

setDisplay()

Setter for display mode.

public setDisplay(bool $display) : void
Parameters
$display : bool

Render or not this field marker.

setForm()

Setter for form context.

public setForm(Form $form) : void
Parameters
$form : Form

Form where render field.

setId()

Setter for id.

public setId(string $id) : void
Parameters
$id : string

Unique id.

setInlineStyle()

Setter dor inline style.

public setInlineStyle(array<string|int, mixed> $inlineStyle) : void
Parameters
$inlineStyle : array<string|int, mixed>

Inline style string.

setIsDisplayLabel()

Setter for display mode of label of field.

public setIsDisplayLabel(bool $isDisplayLabel) : void
Parameters
$isDisplayLabel : bool

True if label must render else false.

setKey()

Seter for key.

public setKey(string $key) : void
Parameters
$key : string

Unique key for field.

setLabel()

Setter for field label.

public setLabel(string $label) : void
Parameters
$label : string

String to set as label for field.

setName()

Field name setter.

public setName(string $name) : void
Parameters
$name : string

Name which use in rendered field.

setPostfix()

Setter for string which render after field content.

public setPostfix(string|Base $postfix) : void
Parameters
$postfix : string|Base

String for render after content.

setPrefix()

Setter for string which render before field content.

public setPrefix(string|Base $prefix) : void
Parameters
$prefix : string|Base

String for render before content.

setValue()

Value setter.

public setValue(mixed $value) : void
Parameters
$value : mixed

Value set as value of field.

setWeight()

Setter for Weight.

public setWeight(int $weight) : void
Parameters
$weight : int

Integer of weightof Field.


        
On this page

Search results