Bitrix API

NumberBlockWithFormula extends NumberBlock

NumberBlock with formula, this view type create widget type like number block except last report, last report will change with formula

Table of Contents

Constants

DEFAULT_EMPTY_REPORT_COUNT  = 3
MAX_RENDER_REPORT_COUNT  = 3
USE_IN_VISUAL_CONSTRUCTOR  = true
VIEW_KEY  = 'numberBlockAAA'

Methods

__construct()  : mixed
Number block with formula constructor constructor.
addComponentParameters()  : mixed
addDefaultReportHandlersToWidgetHandler()  : BaseWidget
When building new widget, add default Report handlers to widget.
buildWidgetHandlerForBoard()  : BaseWidget
Use if need to construct widget entity by view type.
collectReportHandlerFormElements()  : void
Set non-displayable calculate and report category fields.
collectWidgetHandlerFormElements()  : void
Set non-displayable color field in this view type.
getCompatibleDataType()  : string
getCompatibleViewTypes()  : array<string|int, mixed>
Return list of compatible view type keys, to this view types can switch without reform configurations.
getComponentName()  : mixed
getComponentParameters()  : string
getComponentTemplateName()  : string
getHeight()  : mixed
getJsClassName()  : string
getKey()  : string
getLabel()  : string
getLogoUri()  : string
getPreviewImageUri()  : mixed
getReportDefaultColor()  : string
Default colors set for reports.
getReportHandler()  : null
Find report handler by class name and build Report handler in context of widget handler and view type.
handlerFinallyBeforePassToView()  : array<string|int, mixed>
Handle all data prepared for this view.
isCompatibleWithView()  : bool
Check is $view compatible with current view type.
isDraggable()  : bool
isHorizontalResizable()  : bool
prepareWidgetContent()  : array<string|int, mixed>
Pass first report color to widget background color,.
prepareWidgetFormBeforeRender()  : WidgetForm
Collect second and third report configuration block in one horizontal group.
setCompatibleDataType()  : void
Set compatible data type.
setComponentName()  : void
Setter for component name.
setComponentParameters()  : void
Component parameters setter.
setComponentTemplateName()  : mixed
setDraggable()  : void
Setter for draggable.
setHeight()  : void
Setter for height.
setHorizontalResizable()  : mixed
If true then big widget can set to small place.
setJsClassName()  : void
Setter for js class name.
setLabel()  : void
Setter for label.
setLogoUri()  : void
Setter for miniature src.
setPreviewImageUri()  : mixed

Constants

USE_IN_VISUAL_CONSTRUCTOR

public mixed USE_IN_VISUAL_CONSTRUCTOR = true

Methods

addComponentParameters()

public addComponentParameters(mixed $key, mixed $value) : mixed
Parameters
$key : mixed
$value : mixed

buildWidgetHandlerForBoard()

Use if need to construct widget entity by view type.

public final buildWidgetHandlerForBoard(string $boardId) : BaseWidget
Parameters
$boardId : string

Board id.

Return values
BaseWidget

collectReportHandlerFormElements()

Set non-displayable calculate and report category fields.

public collectReportHandlerFormElements(BaseReport $reportHandler) : void
Parameters
$reportHandler : BaseReport

Report handler.

collectWidgetHandlerFormElements()

Set non-displayable color field in this view type.

public collectWidgetHandlerFormElements(BaseWidget $widgetHandler) : void
Parameters
$widgetHandler : BaseWidget

Widget handler.

getCompatibleDataType()

public getCompatibleDataType() : string
Return values
string

getCompatibleViewTypes()

Return list of compatible view type keys, to this view types can switch without reform configurations.

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

getComponentName()

public getComponentName() : mixed

getComponentParameters()

public getComponentParameters() : string
Return values
string

getComponentTemplateName()

public getComponentTemplateName() : string
Return values
string

getHeight()

public getHeight() : mixed

getJsClassName()

public getJsClassName() : string
Return values
string

getKey()

public getKey() : string
Return values
string

getLabel()

public getLabel() : string
Return values
string

getLogoUri()

public getLogoUri() : string
Return values
string

getPreviewImageUri()

public getPreviewImageUri() : mixed

getReportDefaultColor()

Default colors set for reports.

public getReportDefaultColor(int $num) : string
Parameters
$num : int

Number of color which need.

Return values
string

getReportHandler()

Find report handler by class name and build Report handler in context of widget handler and view type.

public getReportHandler(string $reportHandlerClassName, BaseWidget $widgetHandler) : null
Parameters
$reportHandlerClassName : string

Report handler class name.

$widgetHandler : BaseWidget

Widget handler.

Return values
null

handlerFinallyBeforePassToView()

Handle all data prepared for this view.

public handlerFinallyBeforePassToView(array<string|int, mixed> $calculatedPerformedData) : array<string|int, mixed>
Parameters
$calculatedPerformedData : array<string|int, mixed>

Performed data from report handler.

Return values
array<string|int, mixed>

isCompatibleWithView()

Check is $view compatible with current view type.

public isCompatibleWithView(View $view) : bool
Parameters
$view : View

View entity.

Return values
bool

isDraggable()

public isDraggable() : bool
Return values
bool

isHorizontalResizable()

public isHorizontalResizable() : bool
Return values
bool

prepareWidgetContent()

Pass first report color to widget background color,.

public prepareWidgetContent(Widget $widget[, bool $withCalculatedData = false ]) : array<string|int, mixed>

In interface we modify first report color but actually we change background of all widget.

Parameters
$widget : Widget

Widget entity.

$withCalculatedData : bool = false

Marker to set calculate or no reports.

Return values
array<string|int, mixed>

setCompatibleDataType()

Set compatible data type.

public setCompatibleDataType(string $compatibleDataType) : void
Parameters
$compatibleDataType : string

Data type which compatible with view type.

setComponentName()

Setter for component name.

public setComponentName(string $componentName) : void
Parameters
$componentName : string

Component name.

setComponentParameters()

Component parameters setter.

public setComponentParameters(array<string|int, mixed> $componentParameters) : void
Parameters
$componentParameters : array<string|int, mixed>

Parameters which pass to component.

setComponentTemplateName()

public setComponentTemplateName(string $componentTemplateName) : mixed
Parameters
$componentTemplateName : string

setDraggable()

Setter for draggable.

public setDraggable(bool $draggable) : void
Parameters
$draggable : bool

Marker for dragging functionality.

setHeight()

Setter for height.

public setHeight(mixed $height) : void

Can be 'auto'

Parameters
$height : mixed

Height of widget with header 55px.

setHorizontalResizable()

If true then big widget can set to small place.

public setHorizontalResizable(bool $horizontalResizable) : mixed
Parameters
$horizontalResizable : bool

Marker to set resizable mode. #return void

setJsClassName()

Setter for js class name.

public setJsClassName(string $jsClassName) : void
Parameters
$jsClassName : string

Js class name.

setLabel()

Setter for label.

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

Label text.

setLogoUri()

Setter for miniature src.

public setLogoUri(string $logoUri) : void
Parameters
$logoUri : string

Path to miniature image.

setPreviewImageUri()

public setPreviewImageUri(mixed $previewImageUri) : mixed
Parameters
$previewImageUri : mixed

        
On this page

Search results