Bitrix API

AddButton extends Button

Table of Contents

Constants

JSON_OPTIONS_DATA_ATTR  = 'json-options'
UNIQ_ID_DATA_ATTR  = 'btn-uniqid'

Methods

__construct()  : mixed
addAttribute()  : mixed
addClass()  : mixed
addDataAttribute()  : mixed
bindEvent()  : $this
bindEvents()  : $this
create()  : mixed
getAttribute()  : mixed
getAttributeCollection()  : ButtonAttributes
getBaseClass()  : string
getClassList()  : mixed
getColor()  : string|null
getCounter()  : int|string
getDataAttribute()  : mixed
getDataRole()  : mixed
getEvents()  : array<string|int, mixed>
getIcon()  : mixed
getId()  : mixed
getJsClass()  : string
getLink()  : mixed
getMainButton()  : SubButton
getMaxWidth()  : mixed
getMenuButton()  : SubButton
getMenuTarget()  : string
getSize()  : string|null
getState()  : bool
getStyles()  : mixed
getTag()  : string
getText()  : string
getUniqId()  : mixed
hasClass()  : mixed
isActive()  : bool
isClocking()  : bool
isCollapsed()  : bool
isDisabled()  : bool
isDropdown()  : bool
isHover()  : bool
isInputTag()  : mixed
isInputType()  : mixed
isNoCaps()  : bool
isRound()  : bool
isWaiting()  : bool
removeAttribute()  : mixed
removeClass()  : mixed
render()  : string
Returns content as string.
setActive()  : $this
setClocking()  : $this
setCollapsed()  : static
setColor()  : Button
setCounter()  : $this
setDataRole()  : mixed
setDisabled()  : $this
setDropdown()  : static
setHovered()  : $this
setIcon()  : mixed
setId()  : mixed
setLink()  : mixed
setMaxWidth()  : mixed
setMenu()  : $this
setNoCaps()  : static
setRound()  : static
setSize()  : Button
setState()  : $this
setStyles()  : mixed
setTag()  : static
setText()  : $this
setWaiting()  : $this
unbindEvent()  : $this
unbindEvents()  : $this
unsetAttribute()  : mixed
unsetClass()  : mixed

Constants

JSON_OPTIONS_DATA_ATTR

public mixed JSON_OPTIONS_DATA_ATTR = 'json-options'

UNIQ_ID_DATA_ATTR

public mixed UNIQ_ID_DATA_ATTR = 'btn-uniqid'

Methods

__construct()

public final __construct([array<string|int, mixed> $params = [] ]) : mixed
Parameters
$params : array<string|int, mixed> = []

addAttribute()

public addAttribute(mixed $name[, mixed $value = null ]) : mixed
Parameters
$name : mixed
$value : mixed = null

addClass()

public addClass(mixed $className) : mixed
Parameters
$className : mixed

addDataAttribute()

public addDataAttribute(mixed $name[, mixed $value = null ]) : mixed
Parameters
$name : mixed
$value : mixed = null

bindEvent()

public bindEvent(string $eventName, string|JsHandler|JsCode $fn) : $this
Parameters
$eventName : string

Event identifier.

$fn : string|JsHandler|JsCode

Link to js function which will be invoked.

Tags
see
in

js BX.UI.BaseButton.handleEvent to know order of arguments in event handler.

Return values
$this

bindEvents()

public bindEvents(array<string|int, mixed> $events) : $this
Parameters
$events : array<string|int, mixed>
Return values
$this

create()

public final static create([array<string|int, mixed> $params = [] ]) : mixed
Parameters
$params : array<string|int, mixed> = []

getAttribute()

public getAttribute(mixed $name[, mixed $defaultValue = null ]) : mixed
Parameters
$name : mixed
$defaultValue : mixed = null

getBaseClass()

public getBaseClass() : string
Return values
string

getColor()

public getColor() : string|null
Return values
string|null

getCounter()

public getCounter() : int|string
Return values
int|string

getDataAttribute()

public getDataAttribute(mixed $name[, mixed $defaultValue = null ]) : mixed
Parameters
$name : mixed
$defaultValue : mixed = null

getEvents()

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

getIcon()

public getIcon() : mixed

getJsClass()

public static getJsClass() : string
Return values
string

getMenuTarget()

public getMenuTarget() : string
Return values
string

getSize()

public getSize() : string|null
Return values
string|null

getState()

public getState() : bool
Return values
bool

getTag()

public getTag() : string
Return values
string

getText()

public getText() : string
Return values
string

hasClass()

public hasClass(mixed $className) : mixed
Parameters
$className : mixed

isActive()

public isActive() : bool
Return values
bool

isClocking()

public isClocking() : bool
Return values
bool

isCollapsed()

public isCollapsed() : bool
Return values
bool

isDisabled()

public isDisabled() : bool
Return values
bool

isDropdown()

public isDropdown() : bool
Return values
bool

isHover()

public isHover() : bool
Return values
bool

isNoCaps()

public isNoCaps() : bool
Return values
bool

isRound()

public isRound() : bool
Return values
bool

isWaiting()

public isWaiting() : bool
Return values
bool

removeAttribute()

public removeAttribute(mixed $name) : mixed
Parameters
$name : mixed

removeClass()

public removeClass(mixed $className) : mixed
Parameters
$className : mixed

render()

Returns content as string.

public render([bool $jsInit = true ]) : string
Parameters
$jsInit : bool = true
Tags
throws
LoaderException
Return values
string

setActive()

public setActive([bool $flag = true ]) : $this
Parameters
$flag : bool = true
Return values
$this

setClocking()

public setClocking([bool $flag = true ]) : $this
Parameters
$flag : bool = true
Return values
$this

setCollapsed()

public setCollapsed([bool $flag = true ]) : static
Parameters
$flag : bool = true
Return values
static

setCounter()

public setCounter(string|int $counter) : $this
Parameters
$counter : string|int
Return values
$this

setDataRole()

public setDataRole(mixed $dataRole) : mixed
Parameters
$dataRole : mixed

setDisabled()

public setDisabled([bool $flag = true ]) : $this
Parameters
$flag : bool = true
Return values
$this

setDropdown()

public setDropdown([bool $flag = true ]) : static
Parameters
$flag : bool = true
Return values
static

setHovered()

public setHovered([bool $flag = true ]) : $this
Parameters
$flag : bool = true
Return values
$this

setIcon()

public setIcon(mixed $icon) : mixed
Parameters
$icon : mixed

setId()

public setId(mixed $id) : mixed
Parameters
$id : mixed
public setLink(mixed $link) : mixed
Parameters
$link : mixed

setMaxWidth()

public setMaxWidth(mixed $width) : mixed
Parameters
$width : mixed

setMenu()

public setMenu(array<string|int, mixed> $options) : $this
Parameters
$options : array<string|int, mixed>
Return values
$this

setNoCaps()

public setNoCaps([bool $flag = true ]) : static
Parameters
$flag : bool = true
Return values
static

setRound()

public setRound([bool $flag = true ]) : static
Parameters
$flag : bool = true
Return values
static

setState()

public setState(string $state) : $this
Parameters
$state : string
Return values
$this

setStyles()

public setStyles(array<string|int, mixed> $styles) : mixed
Parameters
$styles : array<string|int, mixed>

setTag()

public setTag(string $tag) : static
Parameters
$tag : string
Return values
static

setText()

public setText(string $text) : $this
Parameters
$text : string
Return values
$this

setWaiting()

public setWaiting([bool $flag = true ]) : $this
Parameters
$flag : bool = true
Return values
$this

unbindEvent()

public unbindEvent(string $eventName) : $this
Parameters
$eventName : string
Return values
$this

unbindEvents()

public unbindEvents() : $this
Return values
$this

unsetAttribute()

public unsetAttribute(mixed $name) : mixed
Parameters
$name : mixed

unsetClass()

public unsetClass(mixed $className) : mixed
Parameters
$className : mixed

        
On this page

Search results