Bitrix API

DivPartHtml extends Html

Class DivPartHtml, this class create for save html part context, after add element (start end of div) we can modify them

Table of Contents

Constants

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

Methods

__construct()  : mixed
Html constructor.
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>
getContent()  : string
getDataAttribute()  : mixed|null
Get data attribute by key.
getDataAttributes()  : array<string|int, mixed>
getDiv()  : Div
getForm()  : Form
getId()  : string
getInlineStyle()  : array<string|int, mixed>
getJsEventListeners()  : array<string|int, mixed>
getJsEvents()  : array<string|int, mixed>
getKey()  : string
getLabel()  : 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.
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.
setContent()  : void
Setter for content.
setDataAttributes()  : void
Set Data attributes by array of pair key => values.
setDisplay()  : void
Setter for display mode.
setDiv()  : void
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.
setPostfix()  : void
Setter for string which render after field content.
setPrefix()  : void
Setter for string which render before field content.
setWeight()  : void
Setter for Weight.

Constants

FIELDS_COMPONENT_NAME

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

Methods

__construct()

Html constructor.

public __construct([string $contentHtml = '' ]) : mixed
Parameters
$contentHtml : string = ''

String to set as content of html element.

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

String of class to div.

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 add data attribute ('role').

$value : string

Value of data attribute ('widget').

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>

getContent()

public getContent() : string
Return values
string

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>

getId()

public getId() : string
Return values
string

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

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

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 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.

setContent()

Setter for content.

public setContent(string $content) : void
Parameters
$content : string

String to set as Html element content.

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.

setDisplay()

Setter for display mode.

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

Render or not this field marker.

setDiv()

public setDiv(Div $div) : void
Parameters
$div : Div

Div in which context this element.

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.

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.

setWeight()

Setter for Weight.

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

Integer of weightof Field.


        
On this page

Search results