Image extends Base
Class Image, render image
Table of Contents
Constants
- FIELDS_COMPONENT_NAME = 'bitrix:report.visualconstructor.config.fields'
- JS_EVENT_ON_CLICK = 'onClick'
Methods
- __construct() : mixed
- Image 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>
- getDataAttribute() : mixed|null
- Get data attribute by key.
- getDataAttributes() : array<string|int, mixed>
- 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.
- getUri() : mixed
- 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.
- 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.
- setPostfix() : void
- Setter for string which render after field content.
- setPrefix() : void
- Setter for string which render before field content.
- setUri() : void
- setWeight() : void
- Setter for Weight.
Constants
FIELDS_COMPONENT_NAME
public
mixed
FIELDS_COMPONENT_NAME
= 'bitrix:report.visualconstructor.config.fields'
JS_EVENT_ON_CLICK
public
mixed
JS_EVENT_ON_CLICK
= 'onClick'
Methods
__construct()
Image constructor.
public
__construct([string $sourceUri = '' ]) : mixed
Parameters
- $sourceUri : string = ''
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
$thisgetAssets()
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
stringgetCompatibleViewTypes()
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|nullgetDataAttributes()
public
getDataAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>getForm()
public
getForm() : Form
Return values
FormgetId()
public
getId() : string
Return values
stringgetInlineStyle()
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
stringgetLabel()
public
getLabel() : string
Return values
stringgetPostfix()
public
getPostfix() : Base
Return values
BasegetPrefix()
public
getPrefix() : Base
Return values
BasegetRenderedClassAttributes()
Convert class list property collection to string for render as html in field element.
public
getRenderedClassAttributes() : string
Return values
stringgetRenderedDataAttributes()
Conver data atttribute property collection to string for render as html in field element.
public
getRenderedDataAttributes() : string
Return values
stringgetRenderedIdAttribute()
Conver id property to string for render as html in element.
public
getRenderedIdAttribute() : string
Return values
stringgetRenderedInlineStyle()
Convert inline style propery collection to string for render as html.
public
getRenderedInlineStyle() : string
Return values
stringgetUri()
public
getUri() : mixed
getWeight()
public
getWeight() : int
Return values
intisDisplay()
public
isDisplay() : bool
Return values
boolisDisplayLabel()
public
isDisplayLabel() : bool
Return values
boolprintContent()
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.
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.
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.
setUri()
public
setUri(mixed $uri) : void
Parameters
- $uri : mixed
-
Src of image.
setWeight()
Setter for Weight.
public
setWeight(int $weight) : void
Parameters
- $weight : int
-
Integer of weightof Field.